![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Git
什么龙
这个作者很懒,什么都没留下…
展开
-
Git常用命令
一、本地操作: 1.其它 git init:初始化本地库 git status:查看工作区、暂存区的状态 git add <file name>:将工作区的“新建/修改”添加到暂存区 git rm --cached <file name>:移除暂存区的修改 git commit <file name>:将暂存区的内容提交到本地库 tip:需要再...转载 2020-03-14 09:38:26 · 77 阅读 · 0 评论 -
git分支处理
有时会遇到git branch -a时总是不出现新的分支或者远程已经没有的分支在本地还有,这时就需要更新下本地的git分支保持和远程分支一致,使用下面命令即可: git remote update origin --prune 移除本地分支方法: 列出本地分支:git branch 删除本地分支:git branch -D 分支名 ...原创 2020-02-17 09:25:25 · 99 阅读 · 0 评论 -
git保存与取消保存登录密码
设置 -> git 编辑本地 .git/config 增加 1 [credential] 2 helper = store 保存,输入一次密码后第二次就会记住密码了 注意:要删除globel .gitconfig的内容,否则还会使用之前的 转载于:https://my.oschina.net/projerry/blog/3057842 ...转载 2020-02-17 09:19:44 · 1594 阅读 · 0 评论 -
Git的使用-一个分支完全替换另一个分支
直接将一个分支替换另一个分支方法 git checkout master // 切换到旧的分支master git reset --hard develop// 将本地的旧分支 master 重置成当前新分支develop git push origin master --force // 再推送到远程仓库 ...原创 2019-09-11 23:40:27 · 1450 阅读 · 0 评论