-
Notifications
You must be signed in to change notification settings - Fork 86
Git Commands
git clone <URL>
- clone a repository from github to your local computer
git add <FilesToAdd>
or git add .
- add your changes to your local repository
git commit -m '<CommitMessage>'
- commit your changes and write a brief commit message
git push
- push your changes to your github repository
git checkout -b <Branchname>
- create a new branch and switch to it
git push origin <Branchname>
- push your created branch to github
git branch
- check on which branch you are working right now
git checkout <Branchname>
- switch branches
git status
- check status of your repository (very helpful before calling git add
)
git help
- provides some helpful commands
git remote add upstream https://github.com/NaNaDi/Programming_Tutorial.git
git fetch upstream
git merge upstream/master