codecamp

26. Git 在 master 中更改

目的

学习如何处理包含不同(及可能有冲突)更改的多个分支。

当你更改 greet 分支时,其他人决定更新 master 分支。他们 添加了一个 README。

切换到 master 分支

$ git checkout master

创建 README

This is the Hello World example from the git tutorial.

提交 README 到 master

$ git add README
$ git commit -m "Added README"
25. Git 导航分支
27. Git 查看分叉的分支
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }