Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # basic usage
- ## push an existing project to github
- cd path/to/your/project/
- git init
- git remote add origin git@github.com:USER_NAME/PROJECT_NAME.git
- git pull origin master
- # branch manipulation
- ## create a new branch
- git checkout -b BRANCH_NAME
- ## create a new branch with an older version
- git checkout -b BRANCH_NAME HASH
- ## switch branches
- git checkout BRANCH_NAME
- ## push to some branch
- git push -u origin BRANCH_NAME
- # ssh configuration
- ## link project to github via ssh
- git remote set-url origin git@github.com:USER_NAME/PROJECT_NAME.git
Add Comment
Please, Sign In to add comment