Creating a Remote Branch
1. Create the remote branch
git push origin origin:refs/heads/new_feature_
2. Make sure everything is up-to-date
git fetch origin
3. Then you can see that the branch is created.
git branch -r
This should show ‘origin/new_feature_name’
4. Start tracking the new branch
git checkout --track -b new_feature_name origin/new_feature_name
This means that when you do pulls that it will get the latest from that branch as well.
5. Make sure everything is up-to-date
git pull
Remove local branch
git -d branch-name
Remove remote branch
git push origin :name-of-branch
No comments:
Post a Comment