160 likes | 255 Views
Chapter 4 The Online Repository. Create a repo online on github.com. Go to github.com and sign in Spot the “create new repository” tab Enter the required values. 1. 2.
E N D
Chapter 4The Online Repository Create a repo online on github.com
Go to github.com and sign in Spot the “create new repository” tab Enter the required values 1. 2.
To push your local content (Commits) to online repo, You will need a key to be connected online, It is called a SSH key. You can find it on github. First you have to ADD the local repository connection, then you can PUSH it. After setting up the connection, you can push it online. Check you gitog. 1. 2. 3. 4.
Go to your Github account. Refresh the repo page. There it is ! 1. 2.
Fork and Pull Requests • How to fork and push a repository from different account.Things to take a note of,In this part we are going to fork a repository • Owned by ,Yash03 • Name : Testing • The account which will fork it is : y1ash
Step : 2 Step : 3 Step : 1 1. Testing – yash3shah 2. Fork testing to y1ash 3.Forking Testing.
Open Desktop -> Github,You can see the Testing repo. Open shell, write -> git remote,You shall see two files, origin and upstream. Upstream is the stream of your(y1ash) repo (testing) that is to be uploaded to the original repo(yash3shah->testing). Open a file, change it. Open shell and you’ll see the modifications. 1. 2. 3. 4.
Add files to be staged for commit. Commit changes. 3. Push files to online github.
You can see in github, in y1ash’s profile that in the Tasting repo there are 4 commits.
But in yash03’s profile, in testing repo there is only ONE commit. It’s because the commits that y1ash made are in his repo, and not reflected back in the original repository. Now if y1ash wants to join his repo to the original repo, what he should do
The y1ash’s side if story Go to Testing repository, Initiate a “Pull request”. Add a title and description(Optional). 1. 2.
You can see that y1ash has created a pull request. Just review it and if it is good enough you can merge it.Github can automatically merge the repositories, so you need not to worry about that, unless there is a conflict, then you will have to merge it manually. 1. 2.