Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ローカル ブランチをマージする 2 つの異なる方法を見てきました。
git checkout master git merge new_feature git checkout master git pull . new_feature
違い、長所/短所は何ですか?
ローカルで言えば、マージとプルの間に違いはありません。リモートを処理する場合、「pull」は最初にリモートのオブジェクトをフェッチしてから、ローカルブランチとマージします。ただし、ローカルブランチを処理する場合、フェッチするものは何もないため(すべてのオブジェクトはすでにローカルリポジトリにあります)、プルの「フェッチ」部分は事実上何もしません。ローカルの場合、「プル」は基本的に「マージ」と同じです。