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

git sync-all #83

Closed
kevgo opened this issue Oct 16, 2014 · 5 comments
Closed

git sync-all #83

kevgo opened this issue Oct 16, 2014 · 5 comments
Assignees
Labels

Comments

@kevgo
Copy link
Contributor

kevgo commented Oct 16, 2014

Syncs all local feature branches. Ends up on the same branch as started. Good for keeping the whole workspace up to date.

@kevgo kevgo added feature idea stage A ticket at the idea stage, needs more thinking and removed feature labels Oct 16, 2014
@charlierudolph
Copy link
Collaborator

I like the idea.

The only potential downside to me is if you checked out someone else's feature branch to inspect it on your machine and thus you end up calling git sync on someone else's branch. Syncing isn't a bad thing but you may need to deal with conflicts you don't know what to do with.

Could make a cool interface though so that command would have git sync-all --skip (inspired by git rebase --skip) which skips the sync for that feature branch and moves onto the next branch. Not sure how easy the abort / skip / continue scripts will be to write

@charlierudolph
Copy link
Collaborator

As an alternative, could automatically skip any syncs that have conflicts and simply output what branches were successfully synced and which had conflicts. I think I would prefer that.

@kevgo
Copy link
Contributor Author

kevgo commented Nov 9, 2014

The use case I envision for this is somebody on a bigger project who has lots of PRs open. The reviews of them might take a while.

In order to prevent buildups of massive deviations between the PRs and master, which lead to painful merge conflicts, the developer wants to sync all of her branches regularly, thereby hopefully doing several smaller merge conflicts instead of one big one. So the goal of this command is to see the syncs through instead of postponing them.

From that perspective, I think the most used commands would be "continue" after the conflicts is resolved, with an occasional "skip" if its not my branch. Aborting a sync almost never makes sense, because the only meaningful follow-up action here is to do it again.

Skipping all conflicts automatically seems a bad idea in that scenario, and just results in me having to check out the conflicting branches manually and syncing them manually. The whole point of git sync-all is to automate exactly that.

@charlierudolph charlierudolph self-assigned this Nov 25, 2014
@kevgo kevgo added feature and removed idea stage A ticket at the idea stage, needs more thinking labels Nov 28, 2014
@kevgo
Copy link
Contributor Author

kevgo commented Nov 28, 2014

Output:

[syncing all feature branches]
* feature1
  feature2
  feature3

(output of git sync command for feature 1 here...)

then clear screen and show this

[syncing all feature branches]
  feature1
* feature2
  feature3

(output of git sync command for feature 2)
[syncing all feature branches]
  feature1
  feature2
* feature3

(output of git sync command for feature 2)

@kevgo
Copy link
Contributor Author

kevgo commented Dec 29, 2014

Bump on the priority of this. Working with several open branches in the last week, and just a smaller amount of activity on the main code line (from 2 other developers) resulted in extensive need for git sync all over the place, at least a couple dozen times per day. Having git sync-all would make a huge positive impact on productivity in such a high-velocity environment, and we should try to get it into the next release. I can't even imagine how much more extreme this situation is on a bigger project like Echo, Angies, or soon RMS.

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

No branches or pull requests

2 participants