Closed juwishmaster closed 4 years ago
I'm not sure, I think pushing onto the current branch by default is fine. However we can add an flag option like --all
so you can push all branches changes if you want.
For example:
~> push --all
# or
~> push -a
My idea it's to suppress more the arguments.
To correct my previous comment.
You can push all branches using --all
Git flag because push
also supports passing those Git arguments.
Take a look:
~> push --all
🚀 Pushing changes...
Mode: Manual
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 212 bytes | 212.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To github.com:joseluisq/git-tests.git
* [new branch] branch-1 -> branch-1
* [new branch] branch-2 -> branch-2
* [new branch] branch-3 -> branch-3
* [new branch] master -> master
Branch 'branch-1' set up to track remote branch 'branch-1' from 'origin'.
Branch 'branch-2' set up to track remote branch 'branch-2' from 'origin'.
Branch 'branch-3' set up to track remote branch 'branch-3' from 'origin'.
Branch 'master' set up to track remote branch 'master' from 'origin'.
okay
Send all modifications on all branches by default.
Useful to push two branches changes or more branches changes or of course one branche changes
The Command:
git push <remote> --all
or better on all remotes using
git remote -v
command to detect the remotesBest regards Willy Micieli