-
-
Save barlas/83deef1a9d25825ebefb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git add . | |
git commit -m "message" | |
git show --pretty="format:" --name-only | |
git push | |
delete: git rm -r filename | |
- Create a repository | |
git init <repo-name> | |
git clone <url> <directory-name> | |
git clone -o <remote-name> <url> | |
- Commiting | |
git add <filename> | |
git commit -m "Commit Message" | |
- Remote | |
git remote | |
git remote show <remote-name> | |
git remote add <remote-name> <remote repository URL> | |
git push <remote-name> <branch-name> | |
- Branch | |
git branch <branch-name> | |
git branch -d <branch-name> (delete) | |
git push origin :<branch-name> (delete from remote) | |
git checkout <branch-name> | |
git checkout -b <branch-name> (create and switch) | |
- Merge | |
git merge <branch-to-merge> | |
- Reset | |
git log | |
git checkout <commit-id> | |
git reset HEAD --hard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment