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
270
Help us understand the problem. What is going on with this article?
@ironsand

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

More than 5 years have passed since last update.

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

270
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
ironsand
思いついたアイデアをすぐに形にできる能力を身につけたいのでRailsを頑張って習得中。仕事ください。

Comments

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