travelingbones
travelingbones

Reputation: 8448

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

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?

Upvotes: 5

Views: 3060

Answers (1)

Kristj&#225;n
Kristj&#225;n

Reputation: 18833

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.

Upvotes: 10

Related Questions