Last active
August 29, 2015 14:06
-
-
Save initcron/af46b2495e1b4b89f417 to your computer and use it in GitHub Desktop.
Git Workflow
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
| 1. Clone Repository | |
| $ git clone https://USERNAME@github.com/SST-Cengage/hackathon.git | |
| (replace USERNAME with your github id) | |
| 2. Change into the directory created | |
| $ cd hackathon/ | |
| 3. Check the current branch | |
| $ git branch | |
| 4. Create a New Branch | |
| $ git checkout -b kafka | |
| (replace kafka with the name of your branch) | |
| 5. Make changes | |
| 6. Add new files with "git add <filename>" | |
| 7. Commit your changes | |
| $ git commit -a | |
| 8. Push changes to your branch | |
| $ git push origin kafka | |
| (replace kafka with your branch name) | |
| This will push your changes to github and you shall be able to see it in the list of branches. | |
| However this will not be reflected on the master branch. In order to do that, you need to merge it with master branch. | |
| 9. Merge with master | |
| switch to master branch | |
| $ git checkout master | |
| merge your branch with master | |
| cd to your branch's top level dir | |
| $ git merge kafka | |
| (replace kafka with your own branch name) | |
| $ git push origin master | |
| Your branch is now merged with master. | |
| After this, whenver you want to make changes to your branch, switch to your branch, make changes, commit, switch to master branch and then merge. | |
| http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging | |
| https://guides.github.com/introduction/flow/index.html | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment