git ssb

30+

cel / git-ssb-web



merge instructions are weird

%V7XbcLS/bk74CxT/GN0SEws3xNrRiUGqwlKyMRWvqSs=.sha256
ClosedDominic opened this issue on 7/24/2016, 11:20:05 PM

Check out the branch and test the changes: git fetch > ssb://%MONB7+ExOh8VpFJRkTpot3OiI5/zklCaEjyqdz6l0Zo=.sha256 error-handling
git checkout -b error-handling FETCH_HEAD
Merge the changes and push to update the base branch: git checkout master
git merge error-handling
git push ssb master

why fetch and not pull? to be honest, when I use github I usually just pull directly... using 3 commands to do one thing, is a bit... redundant...

%JHd1vAYOF17vD7CxZ5hoSEKJwB6yfV3TaSCEj4tFCVk=.sha256 cel · 7/25/2016, 4:58:58 AM

the instructions assume you want to examine or test the changes at the PR's head commit. perhaps this is not necessary.

pull <remote> <branch> triggers merging into the current branch, while fetch <remote> <branch> does not trigger a merge.

if we assume you review changes in the web UI and test changes after merging them locally, the steps could be simplified to pull and then push:

Merge via command line…

git pull ssb://%MONB7+ExOh8VpFJRkTpot3OiI5/zklCaEjyqdz6l0Zo=.sha256  error-handling
git push ssb

Do you think this needs any other explanatory text?

%AF89OJ2DqDIct1o1Ld1dNtu6GGWT9L6NixEiTIIDIUk=.sha256 Dominic · 7/25/2016, 5:20:23 AM

it confused me for a second because it's different to github, but then I realized that this way is actually much better. Here I can get exactly the code in your PR, check that it is right, then look at how it merges with the code I have. github shows you how to merge into another branch, which is okay. I just wish it was only one command. git import or something.

%6Pm77C26BJXSRluzPLKdfeFVOQ+2dpWZ4r2QmUYWVoY=.sha256 Dominic · 7/25/2016, 5:22:54 AM

the idea is to checkout the PR. Is there a way to git checkout -b but also pull a remote branch?

%JP8JAMWEpXadjZA99qTTkB694UuGHGD1nS4UDPjBSq8=.sha256 cel · 7/25/2016, 5:43:23 AM

Is there a way to git checkout -b but also pull a remote branch?

not that i know of. lately with github I have used the hub command hub pr <pr_num> which does this. we could perhaps have a command like git ssb pr <pr_id> which would pull and checkout a pull request branch.

%EbErzUSQLxSXMaWcvhltko6w+n9+Vt121VyRKOYgodk=.sha256 Dominic · 7/25/2016, 5:51:05 AM

hmm, yeah that would work.

%WBQIu4bEne+iT1eXLUcX6CjhkD4A7TsF6qKOsQ6FNWE=.sha256 cel closed this issue · 8/25/2019, 9:30:26 PM

Closing as part of cleanup. If anyone thinks the merge instructions should still be different, feel free to open another issue or reopen this one.

Built with git-ssb-web