git status 查看状态

On branch master    // 你目前在哪个分支
Your branch is up to date with 'origin/master'.    // 你最新的分支是'origin/master'

nothing to commit, working tree clean    // 没有什么课提交的,工作树是干净的

查看状态有更改的情况。 

git 命令使用

 git pull --rebase    从仓库拉下来,就是更新本地库

git 命令使用

git 命令使用

 这样就完成了先拉去,并将自己的代码合进去的操作,然后再提交(这样可以避免冲突)。

vim ~/.gitconfig 可以编辑.gitconfig 文件

git add 之后才能git stash 去栈存

git commit 之后才能git push

 

git commit --amend   修正(用的上次的提交信息,跟上次合并了) 

git 命令使用

看不同,对比; 

git 命令使用

修改提交,就是修改上次的提交,即基于上次的提交,

正常的操作是如果涉及到其他与别人可能冲突的类,还是需要栈存的,

就是git stash

git pull --rebase

// 如果有冲突,处理冲突。。

git add..

git commit --amend

gpush

 

相关文章: