Windows 上设置避免每次 git push 都需要账号密码 在 C:\Users\your name\ 目录下找到到 .gitconfig 这个文件,使用编辑器打开 [user] name = **** email = ********.com [credential] helper = st ...
分类:
其他好文 时间:
2020-05-26 11:57:05
阅读次数:
295
Git常用目录 // 初始化Git仓库 $ git init // 将代码添加到暂存区中 $ git add . // 将代码保存到仓库中 $ git commit -m "保存的说明" // 使用本次新的提交,替换上一次的提交,如果代码没有任何变化,用来替换上一次的提交 // 将GitHub上面的 ...
分类:
其他好文 时间:
2020-05-25 19:47:16
阅读次数:
71
推送操作 git push 远程库别名(origin) 你要推送的分支(master) 克隆操作 1.获取远程库的HTTPS地址 2.git clone HTTPS地址 克隆操作可以帮我们完成: (1)初始化本地库(2)将远程库内容完整的克隆到本地(3)替我们创建远程库的别名 拉取操作 git pu ...
分类:
其他好文 时间:
2020-05-24 14:03:45
阅读次数:
60
1.先到要提交项目目录里右键选择git bash。 2.git init 初始化本地仓库 3.git add . 把本地文件添加到本地仓库暂存区,.的意思是把当前目录下所有的文件及子目录都添加管理 4.git commit -m 'first commit'。提交的内容 5.git remote a ...
分类:
Web程序 时间:
2020-05-23 19:57:23
阅读次数:
67
大家好,我是良许。 作为 Linux 用户,大家肯定在 Linux 终端下敲过无数的命令。有的命令很短,比如:ls 、cd 、pwd 之类,这种命令大家毫无压力。但是,有些命令就比较长了,比如: $ git push origin HEAD:refs/for/master 这个时候,你要是敲错了哪怕 ...
分类:
系统相关 时间:
2020-05-22 21:12:58
阅读次数:
67
分两种情况: 1. 本地已经git add,git commit,但没有git push,想要将本地的代码回滚到commit之前 git reset --hard HEAD 撤销前一次commitgit reset --hard HEAD^ 撤销前前一次commitgit reset --hard ...
分类:
其他好文 时间:
2020-05-20 12:47:24
阅读次数:
51
1、git clone http://xxxxxxxxxx.git2、git checkout -b xxxxxx 创建分支,在做新任务之前一定要做3、git add -A4、git commit -am "modified message"5、git push origin xxxxx6、git ...
分类:
其他好文 时间:
2020-05-20 12:25:20
阅读次数:
96
创建分支 git branch -a 查看 git checkout -b test创建git push origin test -u 推送到远程 删除分支gitgit git branch -d test 删除本地git push origin --delete test 删除远程 合并分支 gi ...
分类:
其他好文 时间:
2020-05-19 13:02:18
阅读次数:
54
github地址:https://github.com/liuyi1804/gitskills.git 1、copy本地文件到git文件夹,创建并切换dev,打标签git tag V0.1。2、执行git add auto_unittest/ git commit -m 'V0.1'3、切回mast ...
分类:
其他好文 时间:
2020-05-18 17:03:52
阅读次数:
144