请注意,本文编写于 2062 天前,最后修改于 1350 天前
其中某些信息可能已经过时,如果某些链接无法打开请在下方评论联系我!
其中某些信息可能已经过时,如果某些链接无法打开请在下方评论联系我!
本文章将带领大家探索Git的奥秘
下载Git
在使用Git之前,我们要下载Git的插件来配合Git使用
下载地址:
https://git-scm.com/Git语法使用
仓库文件下载拷贝
git clone创建仓库
git init查看当前仓库情况
git status添加修改
git add (file) or git add .查看未提交的修改
git diff撤销提交操作
git reset提交自己的身份
git config --global user.name "xxx"
git config --global user.email "xxx@xxx.com"向git提交内容
git commit -m ""将本地仓库变为远程仓库
git remote add origin (adress)忽略提交文件
touch .gitignore and add files to .gitignore不再追踪某个文件
git rm --cached (file)添加分支
git branch (name)切换分支
git checkout (name)合并分支
git merge (name)列出本地分支
git branch -a删除分支
git branch -d (name) or -D(Mandatory deletion)设置本地分支追踪远程分支
git push --set-upstream