git - How to push a branch back to a private github repo -
git - How to push a branch back to a private github repo -
i've cloned private repo in github local machine. after i'm done making changes, want force branch github propose merge (or pull request, github calls it).
how do that?
i'm absolutely new github (i utilize bzr/launchpad, , command bzr force lp:~<username>/<master-branch>/<name of new kid branch>
. equivalence of in git
?).
[edit: found wording confusing due little understanding of git's terminologies, going re-describe did]
(bar
private repo)
$git clone git@github.com:foo/bar.git $cd bar $touch <some file> # ie., create changes $git commit ... $ <<<<< need force github here.
from comments above , original question, want pull request on github you've modified master
locally ... that's problem. wanted branch first, create changes, commit locally, , force branch. create pull request on github branch.
first need prepare is:
git branch mytopicbranch git reset --hard origin/master
you have branch , have reset master
locally in remote repo. can force branch with:
git force origin mytopicbranch
then on github you'll able create pull request branch.
the normal flow following:
git clone <remote repo> <cd directory> git checkout -b mybranch <make changes> <commit changes> git force origin mybranch <create pull request on github>
edit add: reason asked; wanting "pull request". if want force master
you'd do:
git force origin master
and changes committed master remotely.
git github
Comments
Post a Comment