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

[FEAT]: Handle branches #2

Closed
andreaiaia opened this issue Sep 25, 2023 · 1 comment
Closed

[FEAT]: Handle branches #2

andreaiaia opened this issue Sep 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@andreaiaia
Copy link

Description

What about a way to update the main branch of all repos?

Additional Information

At the moment the only behavior is to update the current branch of all the repos, it may be interesting to add an option to pull the main/master branch instead.

In my zshrc I have this function that I use to merge new changes of main to my current develop branch:

 # update the current branch with changes from main
function forward() {
    branch_name=$(git branch --show-current);
    git switch main; echo;
    git pull; echo;
    git switch $branch_name; echo;
    git rebase main; echo;
}

I think the rebase/merge should be omitted, a rebase/merge to every repo might seriously break things, but the part of switching to main, pull, and go back to the branch it was on might be useful.

The default behavior might be the current one, and then a flag like -m or something could activate the main/master pull.

@andreaiaia andreaiaia added the enhancement New feature or request label Sep 25, 2023
@kocierik
Copy link
Owner

This is a good idea! I have added this functionality in the latest commits.

ty @andreaiaia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants