how to reset to remote repo
I cloned some public git repos and made some local patches. Later I pulled updates again and that merged with my patches. Now I want to throw away my patches, how do I get a clean working repo that is a 100% clone of the remote repo?
Signature · 6 lines
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩285 張祜 集靈臺二首之二
虢國夫人承主恩 平明騎馬入宮門 卻嫌脂粉污顏色 淡掃蛾眉朝至尊git reset --hard HEAD
-- BR, Dilip
Quoted 17 lines · bill lam
I cloned some public git repos and made some local patches. Later I pulled updates again and that merged with my patches. Now I want to throw away my patches, how do I get a clean working repo that is a 100% clone of the remote repo?
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 唐詩285 張祜 集靈臺二首之二
虢國夫人承主恩 平明騎馬入宮門 卻嫌脂粉污顏色 淡掃蛾眉朝至尊
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · bill lam
I cloned some public git repos and made some local patches. Later I pulled updates again and that merged with my patches. Now I want to throw away my patches, how do I get a clean working repo that is a 100% clone of the remote repo?
git reset --hard origin/master
This is a very simple question, and may be quicker on irc :-)
Quoted 4 lines · Sitaram Chamarty
git reset --hard origin/master
This is a very simple question, and may be quicker on irc :-)
Does it always work? For example if I already made several patches interleaved with several fetch/update, or if I rebase to remove the orgin/master?
Signature · 6 lines
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩286 張祜 題金陵渡
金陵津渡小山樓 一宿行人自可愁 潮落夜江斜月裡 兩三星火是瓜州Quoted 9 lines · bill lam
Quoted 4 lines · Sitaram Chamarty
git reset --hard origin/master
This is a very simple question, and may be quicker on irc :-)
Does it always work? For example if I already made several patches interleaved with several fetch/update, or if I rebase to remove the orgin/master?
I'm not sure why a rebase of any kind would remove a remote brancg but you can always do 'git fetch' first if you accidentally messed up origin/master.
Quoted 3 lines · Sitaram Chamarty
I'm not sure why a rebase of any kind would remove a remote brancg but you can always do 'git fetch' first if you accidentally messed up origin/master.
Thanks. Incidentally I just found that I could git reset just before my first patch and then git pull again.
Signature · 6 lines
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩226 王維 送別
山中相送罷 日暮掩柴扉 春草明年綠 王孫歸不歸