Feature Request: merge branch locally but never commit

Working in a large team as FE developer we frequently are doing work while the BE is also working. (2 or more branches actively working). Sometimes we are even working off of an alternate master/feature branch. (which can be 3 or more branches sometimes)

So we tend to have to merge other peoples branches into our current branch in order to develop our work in parallel but then we have to create another branch after that in order to strip out only our code for the PR. 

I’ve been looking for the best way to handle this but haven’t found a really prime method. 

My current practice is on my branch (all of my work stashed or commited) I  git pull --squash remote/branch the other branch. do my work and commit single files (very rarely the same files from the squashed remote branch). 

For updates to remote branch, I commit my work or stash all work in progress, merge new work. git stash apply resolve conflicts and develop.

Pushing my PR, commit only my work (thank you for git add -i) stash remote branch work and PR from there… 

Feature request: 
The ability to commit/merge/include a branch(remote or local) that actually never gets commited. Would need to allow you to update it, or just create another hidden commit. 

Hi @ankiewicz ,

Thanks for this feedback! We’re always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I’ve logged your feature request in our internal feature request list. Though I can’t guarantee anything or share a timeline for this, I can tell you that it’s been shared with the appropriate teams for consideration.


I’m not entirely sure what it is you’re asking for. You can already create a branch and then never add an additional commit to it. You can also already create a branch that has no commits on it using the --orphan option. So I’m not sure what it is you need that doesn’t already exist within git itself.

Additionally, I’m not sure I understand your workflow. It sounds like you have a fairly standard setup:

  1. There is a main branch somewhere
  2. There are teams working on their own branches
  3. You are working on some other branch
  4. Occasionally, you need to bring in the latest code from some team branch
  5. When your work is done, you need to merge your code into one of the team branches or the main branch

But the process you describe sounds overly complex for the above scenario. Am I understanding your situation correctly?

Final note, I don’t know what the terms FE and BE mean :grinning:

Let me know if you can give more details or have more questions.

1 Like