git command
1. git client cd to path,
Example: e:\android\TFS\
2. git clone
https://xxx.visualstudio.com/DefaultCollection/_git/zzz
maybe need input username&password
3. cd to [zzz]
4. add files
git add
5. commit
git commit -a
run Vim
"I" start edit
Esc + ":WQ", save and commit
Vim:http://www.cnblogs.com/softwaretesting/archive/2011/07/12/2104435.html
6. git push
7. git pull
8. git fetch
9.git config --global credential.helper store
http://www.cnblogs.com/wangkangluo1/p/3578261.html
如果提交的历史记录显示用户名是unknown,做如下修改
> git config --local -e
[user]
name = Anna Kowalska
email = anna.kowalska@wp.pl
git fetch --all
git reset --hard origin/master
http://blog.csdn.net/ithomer/article/details/7529022
查看本地分支:$ git branch
查看远程分支:$ git branch -r
创建本地分支:$ git branch [name] ----注意新分支创建后不会自动切换为当前分支
切换分支:$ git checkout [name]
创建新分支并立即切换到新分支:$ git checkout -b [name]
删除分支:$ git branch -d [name] ---- -d选项只能删除已经参与了合并的分支,对于未有合并的分支是无法删除的。如果想强制删除一个分支,可以使用-D选项
合并分支:$ git merge [name] ----将名称为[name]的分支与当前分支合并
创建远程分支(本地分支push到远程):$ git push origin [name]
删除远程分支:$ git push origin :heads/[name] 或 $ gitpush origin :[name]
*创建空的分支:(执行命令之前记得先提交你当前分支的修改,否则会被强制删干净没得后悔)
$git symbolic-ref HEAD refs/heads/[name]
$rm .git/index
$git clean -fdx