Kalau tak nak merge conflict, cuma nak ambil local copy, guna --ours.
Kalau nak guna remote guna --theirs
git checkout --ours# checkout our local version of all files
Nak diff antara dua branch
git diff master origin/master
Nak merge current branch dengan remotes/origin/master
git merge origin/master
Nak sycn github repository dengan Original(fork dari) Master Repository
git remote add upstream git://github.com/pemula/projek.git
git fetch upstream
git merge upstream/master
#selesaikan conflict, jika ada
git push origin/master
No comments:
Post a Comment
Terima kasih