Skip to content

Instantly share code, notes, and snippets.

@satsie
Created November 8, 2018 15:22
Show Gist options
  • Select an option

  • Save satsie/80b4ec094a411e938ed604f96a4d58c2 to your computer and use it in GitHub Desktop.

Select an option

Save satsie/80b4ec094a411e938ed604f96a4d58c2 to your computer and use it in GitHub Desktop.
Notes on Git
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