326
265

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

`git push -u` オプションの意味

Last updated at Posted at 2013-11-08

man git-push して -u オプションについて調べた。

-u, --set-upstream
           For every branch that is up to date or successfully pushed, add
           upstream (tracking) reference, used by argument-less git-pull(1)
           and other commands. For more information, see branch.<name>.merge
           in git-config(1).

全く何を言ってるのかわからない!

答え

ネットで検索してみたら答えがわかった。

git push -u origin master とすると次回から git push だけで勝手に origin master で push してくれる。

ちなみに git push とかの マニュアルは全て man git-push とか man git-pull のようにダッシュで繋げて書けば見れます。man git push だと git と push それぞれのマニュアルを探そうとするので気をつけましょう。

参考

ブランチ
http://marina.sys.wakayama-u.ac.jp/vmlab/git/node6.html

326
265
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
326
265

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?