Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resume delivered work almost possible after ci job failed #275

Open
buep opened this issue Oct 31, 2017 · 3 comments
Open

Resume delivered work almost possible after ci job failed #275

buep opened this issue Oct 31, 2017 · 3 comments

Comments

@buep
Copy link
Contributor

buep commented Oct 31, 2017

I know we can't resume work with git phlow easily, see #31 and #264 but the work around could be the following - except from it complains with an error, even though it work.

Why is that?

Here is what I did:

git checkout master
ghi create -m "test issues 6"
git phlow workon 6
date > date.log 
git phlow wrapup
git phlow deliver

echo "bugger, my ci job failed... forgot a change"

Now I try to clean up and prepare myself to resume the branch. I delete the failing remote so it can be pushed again, and rename the local branch that was delivered to what the original name was.
I also delete the local delivered/ branch so renaming works again later.

git push origin :ready/6-test-issues-6 
git checkout delivered/6-test-issues-6 
git branch 6-test-issues-6 
git checkout 6-test-issues-6 
git branch -D delivered/6-test-issues-6 

Now I'm on the a branch with the original name and fix the failure:

echo "missing change" >> date.log 
git phlow wrapup

But deliver fails:

$ git phlow deliver
delivering...
Error in rebasing: 
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> 6-test-issues-6


Delivered branch 6-test-issues-6 

$ git checkout ready/6-test-issues-6 
Branch ready/6-test-issues-6 set up to track remote branch ready/6-test-issues-6 from origin.
Switched to a new branch 'ready/6-test-issues-6'

$ cat date.log 
Tue Oct 31 20:54:30 CET 2017
missing change
@buep buep changed the title Resume work almost work after ci job failed Resume delivered work almost possible after ci job failed Oct 31, 2017
@buep
Copy link
Contributor Author

buep commented Nov 1, 2017

@groenborg says that the rebase error might be caused by the way I delete my branch, as this might change up tracking branches.

The above workflow should work if I go to git repository server and delete the branch through the UI.

It is the same workflow explained here: https://github.com/Praqma/git-phlow/tree/master/docs#did-deliver-but-meant-deliver---local

@groenborg groenborg added this to the Backlog milestone Nov 6, 2017
@buep
Copy link
Contributor Author

buep commented Dec 13, 2017

I would like this issues to be wrapped up by just adding better documentation on the problem above and how to get out of it.

I think probably #283 fixes it - confirm it and close this one, or contribute to new documentation.

@mortench3000
Copy link

I don't understand why the rather simple workflow described under https://github.com/Praqma/git-phlow/blob/master/docs/troubleshooting.md#failed-build cannot be automated to the point where you can issue a git phlow wrapup after making the desired changes.
Maybe even introduce a prompt 'Are you sure (y/n)' before deleting the remote ready branch...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants