Last active
August 29, 2015 14:17
-
-
Save bo858585/b33af90c3c84255c62a2 to your computer and use it in GitHub Desktop.
How to work with non-local branches for the warranty of the commit atomicity (possible strategy/man):
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
# Create branch from master/development/another working branch | |
git checkout -b branch_name | |
# Write code | |
# Add code to commit | |
# (Use a/u (add/update) options of the interactive command for adding new files/updating existing files) | |
git add -i | |
# Create commit | |
git commit | |
# Simply push commit to non-local branch: | |
git push origin branch_name | |
# Add code to commit | |
# (Use a/u (add/update) options of the interactive command for adding new files/updating existing files) | |
git add -i | |
# Complete commit | |
git commit --amend | |
# Push completed commit to server | |
git push origin branch_name -f | |
# Then you will have single commit at server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment