Convenient way to move branch pointer around? #402
-
|
When adopting the divergent workflow, I often need to point branch pointer to head to exit detached head mode, so I may upload my work to git server. Currently, I'm doing this:
Is there a better way? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Hi @PhotonQuantum, can you clarify a little more about your workflow? What do you do after I think there's two parts of your problem which have to be addressed:
For syncing, git-branchless provides the If you want to do a merge, you can also just do it the other way, and write Or, you can run For pushing, you could just run I personally don't use a local main branch at all, and I just work using If you're using a service which requires you to have a branch name, then there's not much you can do about that. I usually do UPDATE: I recently learned that UPDATE: |
Beta Was this translation helpful? Give feedback.
-
|
If you are just trying to merge an anonymous branch into If the merge would be a fast forward merge (ie your anonymous branch is already based on the current |
Beta Was this translation helpful? Give feedback.
Hi @PhotonQuantum, can you clarify a little more about your workflow? What do you do after
git merge temp? Do yougit pushthemainbranch? Or, for example, do you use the branch to open a code review for others to see?I think there's two parts of your problem which have to be addressed:
main, without branches?For syncing, git-branchless provides the
git synccommand, which will rebase your stacks on top of themainbranch. Note that it does a rebase rather than a merge.If you want to do a merge, you can also just do it the other way, and write
git merge mainwhile you're on your commit.Or, y…