使用git之二添加与提交(学习笔记二)
使用git之二添加与提交(学习笔记二)
使用git之二添加与提交(学习笔记二)
添加和提交
git add -i //交互模式添加
git add -p //交互模式下的path模式
git add somefile
git commit -m "changes to somefile"
git commit -m "changes to somefile" -a
git commit -m "changes to somefile" somefile
git config --global alias.ci "commit" 完成git ci = git commit
git diff
git diff --cached
git diff HEAD
git mv index.html hello.html
如果不用git mv 则需要git add 新文件和git rm 旧文件
忽略文件
版本库的忽略配置文件.gitignore ".*.swp"
编辑.git/info/exclude文件 实现本地级的忽略 ".*.swp"
评论暂时关闭