Help us understand the problem. What is going on with this article?

git でどすこいする方法

More than 3 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してね)

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

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
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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