git clone
- download repository to localgit checkout [branch name]
- Checkout a branchgit checkout -b [branch name]
- Create a new branchgit branch
- Get a list of branches in this repositorygit pull
- Get new changes from remotegit add [filename]
- Add new files to repositorygit commit -am "Message describing the committed code"
- Commit all changes to the repositorygit commit path/to/file -m "Message describing the committed code"
- Commit single file to the repositorygit push
- push your changes to remotegit config --global user.name "Your Name"
- Add global username to your git configurationgit config --global user.email "you@example.com"
- Add global email to your git configuration Create .gitignore_global in your home folder. Run this echo .DS_Store >> ~/.gitignore_global
- to create .gitignore_global file in your home folder and exclude all .DS_Store files.
Run git config --global core.excludesfile ~/.gitignore_global
for git to use it for all repositories. You need to run this everytime you update .gitignore_global