-
Git Bash Download : https://git-scm.com/downloads
-
Git Desktop Download: https://desktop.github.com/
Step 2: fork
- Go to the Demo Repository
- Click on the fork button
Step 3: clone
- Now you need a copy locally in your account, so find the “SSH clone URL” in the right hand column and copy the SSH link
- Now open git bash and go to the folder where you need to create your local repository
ex -:
cd ~/Desktop
- Then type clone command as below with the copied link of the repository
git clone https://github.com/FOSS-UCSC/demo
- Now go to the newly created folder named "demo" in the desktop or location that you specified before
- Now you can do any thing you want inside that folder. For this tutorial, open test.txt and do appropriate changes
Step 5: Git Track Files
- Type the following command in the Git Bash
cd ./demo
git add .
for tracking all the files use Dot. If you want, you can give the specific file name to track
Step 6: Git Commit
- Type the following command in the Git Bash
git commit -m "I wrote my name and username"
Step 7: Git Push
If this is the first time of pushing, you have to make a SSH key for your account.
- Type the following command in the Git Bash
git push origin master
Step 8: Pull Request
Now you have forked a repository from FOSS-UCSC to your account, created a clone repository to your local machine from that forked repository, did some changes and pushed it to the github repository in your account. Now we have to make your changes in the repository of FOSS-UCSC too.
-
Go to the "demo" github repository in your account and click the pull request link
-
Do the rest of things in appropriate way and make a new PR. After you make a PR we can review it and merge to our repository
Get a copy of a repository from an account of someone else to your account.
Get a copy of a repository from your github account to your local machine.
Git is a system which can to track the changes of your files.
Commiting is something similar like saving changes inside the git.
When you do some changes on the local repository in your machine, that's not do any change in the repository of your github account. To do that changes you need to push it.
git push origin
Branching is a key feature of the git and github. You can use git bash to work with branches.
- To create a new branch
git branch
- To switch to another branch
git checkout
- To delete a branch
git branch -d
git status
Follow the 1 & 2 links to generate and add SSH key to your github account