# create and switch to new branch, in one line
git checkout -b new-branch-name
# add new changes to the code, after all done check status
git status
# add new files if needed
git add .
# commit the new changes
git commit -m "Added new feature"
# to push the current branch and set the remote as upstream, use
git push --set-upstream origin new-branch-name
# you will get a message like `Branch new-branch-name set up to track remote branch new-branch-name from origin.`
# your code changes are now pushed to remote git
# a `git status` would give a message like
# Your branch is up-to-date with 'origin/new-branch-name'.
# you can now create a new pull request from app
Last active
September 7, 2017 17:14
-
-
Save palashmon/b4850cdaf85f301d49236325a77d7b30 to your computer and use it in GitHub Desktop.
Create a new branch for adding a new feature to master
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment