- Create new repository
git init
- Configure git settings
git config –global user.name “GDG Ankara”
- Add changes to Index
git add .
- Commit changes
git commit -m "Why?"
- Remove file from Index
git rm File.java
- Repository status
git status
- Clone repository
git clone repository_path
- List branches
git branch
- Switch between branches
git checkout branch_name
- Merge branches
git merge otherbranch
- Reset to previous commit
git reset
- Update local repository from remote
git pull
- Push changes to remote repository
git push remote_repo local_branch
- Add remote repository
git remote add remote_repo_name remote_repo_path
- Remove untracked files
git clean -f
- Remove ignored files
git clean -f -X