How to realize -GIT pull latest version to a local copy and work with prevoius changes
I'm a newbie with GIT, a few months ago, i use git to pull the Head to a local copy and then on this copy i change some code, e.g. 'my test code' insides a lots of files. now i found previous copy has some bugs and latest head fixed it, so i want to pull out the latest Head, however, meanwhile i want to keep my previous changes, is it doable? if not, i have to pull the latest Git to another local copy and on this copy i have to manually rewrite my changes in all of relative fiels, it will be a heavy workload (my god ), would somebody can help how to minimize the manual work load to realize it, thanks in advance! P.S. i'm using 'Git Extensions' as git tool on windows platform... Regards. Charles 2011-04-01 Charles
git stash save git pull git stash pop -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-realize-GIT-pull-latest... Sent from the freeswitch-users mailing list archive at Nabble.com.
Hi Jeff, Your reply of each time are all so valuable... admire you very much! Thank you very much! Regards, Charles 发件人: Jeff Lenk 发送时间: 2011-04-01 10:19:27 收件人: freeswitch-users 抄送: 主题: Re: [Freeswitch-users] How to realize -GIT pull latest version to alocal copy and work with prevoius changes git stash save git pull git stash pop -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-realize-GIT-pull-latest... Sent from the freeswitch-users mailing list archive at Nabble.com. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Jeff, During the procedure, will my changed code be uploaded to remote server or just in local? thanks. 2011-04-01 Charles 发件人: Jeff Lenk 发送时间: 2011-04-01 10:19:27 收件人: freeswitch-users 抄送: 主题: Re: [Freeswitch-users] How to realize -GIT pull latest version to alocal copy and work with prevoius changes git stash save git pull git stash pop -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-realize-GIT-pull-latest... Sent from the freeswitch-users mailing list archive at Nabble.com. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
no problem! The stash save will move your local changes aside(to a holding place so to speak) so you can pull the changes from the remote repo and then the stash pop merges your changes back into the local directory. all this is done on your local directory and repository. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-realize-GIT-pull-latest... Sent from the freeswitch-users mailing list archive at Nabble.com.
thanks! understood. 2011-04-01 Charles 发件人: Jeff Lenk 发送时间: 2011-04-01 11:09:36 收件人: freeswitch-users 抄送: 主题: Re: [Freeswitch-users] How to realize -GIT pull latest version toalocal copy and work with prevoius changes no problem! The stash save will move your local changes aside(to a holding place so to speak) so you can pull the changes from the remote repo and then the stash pop merges your changes back into the local directory. all this is done on your local directory and repository. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-realize-GIT-pull-latest... Sent from the freeswitch-users mailing list archive at Nabble.com. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Jeff, As my lastest understanding (learning from google just now ), i can also create a branch at local, on this branch i change my codes, and after a few days i can merge the lastest master(git from remote) to my branches... so, i can periodically (few days or months) do like this to keep my changes code and update latest master to my codes (when i need)... is my understanding correct? Thanks! Regards, Charles 2011-04-01 Charles 发件人: Jeff Lenk 发送时间: 2011-04-01 11:09:36 收件人: freeswitch-users 抄送: 主题: Re: [Freeswitch-users] How to realize -GIT pull latest version toalocal copy and work with prevoius changes no problem! The stash save will move your local changes aside(to a holding place so to speak) so you can pull the changes from the remote repo and then the stash pop merges your changes back into the local directory. all this is done on your local directory and repository. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-realize-GIT-pull-latest... Sent from the freeswitch-users mailing list archive at Nabble.com. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Charles, You sure can do that. Thats what git it for. Just be aware if you have local changes and have problems it may be more difficult for "you" to determine whether your modifications or the base code possibly is at fault. Potential problems in the fs base code have to be reproduced with git head with no other modifications or being able to demonstrate clearly what the problem is and then submitting diffs against git head. Jeff -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-realize-GIT-pull-latest... Sent from the freeswitch-users mailing list archive at Nabble.com.
Thanks Jeff, understood. Regards, Charles 2011-04-02 Charles 发件人: Jeff Lenk 发送时间: 2011-04-01 21:57:37 收件人: freeswitch-users 抄送: 主题: Re: [Freeswitch-users] How to realize -GIT pull latest versiontoalocal copy and work with prevoius changes Hi Charles, You sure can do that. Thats what git it for. Just be aware if you have local changes and have problems it may be more difficult for "you" to determine whether your modifications or the base code possibly is at fault. Potential problems in the fs base code have to be reproduced with git head with no other modifications or being able to demonstrate clearly what the problem is and then submitting diffs against git head. Jeff -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-realize-GIT-pull-latest... Sent from the freeswitch-users mailing list archive at Nabble.com. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Charles
-
Jeff Lenk