Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git flow: Can I publish a feature more than once before I finish the feature?

Tags:

git

git-flow

I'm beginning to use git flow. I have created a feature:

git flow feature start eval

then I did some work and added and committed changes:

git add (files)
git commit -m "(description of commit)"

I hadn't finished the feature, but wanted to push it to an external repo to back it up for the night:

git flow feature publish eval

Ok, no problem so far. Now I'm working again, and I'd like to push some new changes to the external repo, but I'm still working on the feature. But when I run

git add (new files)
git commit -m "(description 2)"
git flow feature publish eval

it returns

Branch 'origin/feature/eval' already exists. Pick another name.

But my branch is feature/eval, so if I pass another branch name to git flow feature publish <name>, it will throw an error.

In summary, my question is this-- How do I push multiple commits when I'm in the middle of (not ready to finish) a feature? Can I just run something like git push origin feature/eval?

like image 942
travelingbones Avatar asked Nov 11 '15 16:11

travelingbones


1 Answers

The git-flow extension checks that the branch name doesn't already exist to prevent you or someone else from accidentally overwriting it. It also configures your branch to track the remote branch you just published, so you can now just git push whenever you have more changes.

like image 167
Kristján Avatar answered Oct 11 '22 06:10

Kristján