Guest User

Untitled

a guest
Mar 18th, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. # basic usage
  2. ## push an existing project to github
  3. cd path/to/your/project/
  4. git init
  5. git remote add origin git@github.com:USER_NAME/PROJECT_NAME.git
  6. git pull origin master
  7.  
  8. # branch manipulation
  9. ## create a new branch
  10. git checkout -b BRANCH_NAME
  11. ## create a new branch with an older version
  12. git checkout -b BRANCH_NAME HASH
  13. ## switch branches
  14. git checkout BRANCH_NAME
  15. ## push to some branch
  16. git push -u origin BRANCH_NAME
  17.  
  18. # ssh configuration
  19. ## link project to github via ssh
  20. git remote set-url origin git@github.com:USER_NAME/PROJECT_NAME.git
Add Comment
Please, Sign In to add comment