1、将服务器端的项目下载文件到本地仓库
git clone git@git.j.moqi.im:shengtian/jinfu-java.git
###CREAT(创建)
git init 在当前目录下创建一个本(Create a new local repository)
git clone ssh://user@domain.tld/repo.git 在远程库克隆一个本地库(Clone an existing repository)
###Configuration(配置)
git config [--global] user.name 设置提交时附带的名字(Set the name attached to all your commits)
git config [--global] user.email 设置提交时附带的email(Set the email attached to all your commits)
git config --global color.ui auto 设置命令行输出回执的颜色(Set colorzition of command line output for all repos)
git config [--global] user.name 获取当前库设置的用户名(Print set name(in current repository or globally))
git config [--global] user.email 获取当前库设置的email(Print set email(in current repository or globally))
###Local Changes(本地操作)
git status 查看工作区内的文件修改(List changed files in your working directory)
git diff 查看已追踪文件的修改(List changed to tracked files)
git add 添加此文件的所有修改在下次提交时(Add all current changed in file to the next commit)
git add . 添加本地库中的所有修改在下次提交的时(Add all current changed to the next commit)
git mv 修改文件名并添加到下次提交当中(Rename file and add it to next commit)
git rm 删除此文件并将此处删除添加到下次提交当中(Delete file and add its deletion to next commit)
git commit -a 提交工作区所有文件(Commit all local changes in tracked files)
###Commit History(提交历史)
git log 显示所有的提交日志(Show all commits)
git log -p 这个文件的最后一次提交日志(Shwo changes over time for a specific file)
git log --author=<committer name> 这个提交者最后一次的提交日志(Show changes over time for a specific committer)
git blame <file> 此文件被谁修改了(Who changed what and when in file)
git stash 查看临时的文件变动 (Store changes temporarily)
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载