Created
November 8, 2018 15:22
-
-
Save satsie/80b4ec094a411e938ed604f96a4d58c2 to your computer and use it in GitHub Desktop.
Notes on Git
This file contains hidden or 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
| Creating brand new repositories with a branch named "develop": | |
| 1. git init | |
| 2. copy the .gitignore file from another directory | |
| 3. git add . | |
| 4. git commit | |
| 5. git branch develop | |
| 6. git checkout develop | |
| 7. git remote add origin … (command comes from bitbucket/github) | |
| 8. git push -u origin develop | |
| See what branches available in the repository: | |
| git branch -r | |
| Check remote repository’s name: | |
| git remote -v | |
| Removing files from the staging area: | |
| git reset HEAD -- . | |
| Reverting a commit | |
| git revert ${commit ref/hash} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment