For convenience to develop and not to mix with my original project (Moonlyt/Moonlyt) in the team, I forked the project to my own repository (Wenling/Moonlyt) and do local development. But actually I have no idea how to keep my repo up-to-date with the original one, and this brought me a lot of trouble like I have to clone one to my local path then delete the old one of mine...
It's quite easy to reserve my own branch.
Reference:
http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
# switch to a new branch
git checkout -b upstream/master
# bind the branch to the remote original one
git remote add upstream git://github.com/moonlyt/moonlyt.git
# usually fetch is better as it don't automatically implement the merge command for
# you. Pull request for update from original (upstream) to my repo (master)
git pull upstream master
# switch to my master branch
git checkout master
# merge upstream and my master branch
git merge upstream/master
# push
git push origin master
ctrl-z和ctrl-c都是中断命令,但是他们的作用却不一样.
ctrl-c是强制中断程序的执行,
ctrl-z是将任务中断,但是此任务并没有结束,他仍然在进程中他只是维持挂起的状态,用户可以使用fg/bg操作继续前台或后台的任务,fg命令重新启动前台被中断的任务,bg命令把被中断的任务放在后台执行.
恢复挂起的程序命令:
1、用jobs 查看被挂起程序的序号x
2、用fg %x 恢复被挂起程序(如果只有一个被挂起程序,那直接fg就可以恢复了)
No comments:
Post a Comment