Git push single file to remote tracking branch

People,

This is my use case: I have 3 branches, all three are remote tracking branches.

git branch
  release-alpha
* release-allUS
  master

Now I added a new file to the release-allUS branch, I made a commit by doing the following:

 git add filter_driver.rb 
 git commit -m "driver code"

Now I want to push only this file to the remote release-allUS branch, how to do this? Thanks so much for any feedback.

+5
source share
2 answers

Since all that you have done locally is that one file git pushwill work on your remote. Push will only push what has been done locally.

git push origin release-allUS

, , , . , , , , , , .

+11

, :

git push origin <branch>

git push --help , , .

, integration, , , . integration, git cherry-pick <commit> , , , integration, git push origin integration.

+4

All Articles