Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
9
Help us understand the problem. What is going on with this article?
@NPoi

git でどすこいする方法

More than 5 years have passed since last update.

社内で、git push って相撲の突き出しみたいだよね、という話が出たので、そういうエイリアスを書けば良いじゃんと言う流れになった。

export remote='origin'
alias dosukoi='git push ${remote} `git rev-parse --abbrev-ref HEAD`'

↑のを、.bashrc に書いて

source ~/.bashrc

すると、

$ dosukoi
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 324 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To git@hogehogehost:fuga/tsukareta.git
 * [new branch]      feature/hoge -> feature/hoge

どすこいできる!!!!
(なお、私自身は動作未検証です)

他のリモートホストにpushするときは、

export remote=nanika;dosukoi

どすこいできる!!!!
(なお、動作未検証です。あと、originに戻すときは、さきにexportしてね)

ノリだけで乗り切りたい。
突っ込み待ちです。

9
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
9
Help us understand the problem. What is going on with this article?