Push to remote branch of remote repo
git push <remote_name> +<br_name>:refs/remotes/<my_name>/<br_name>
I suddenly realize this is a convenient command to push updates to each working copy, which may have the same branch name checkout. Git wont allow you to push to a checkout branch. This prevent that from happening.
Make an alias for this:
[alias]Then you can do:
rpush = !sh -c 'git push $1 +HEAD:refs/remotes/$2/$3' -
git rpush <remote_name> <my_name> <br_name>
Aliases - Git SCM Wiki
https://git.wiki.kernel.org/index.php/Aliases#Advanced_aliases_with_arguments
沒有留言:
張貼留言