随笔分类 - git
摘要:1.git stash2.git fetch weixin-old-remote3.git rebase weixin-old-remote/main151028_wxpay_main1510084.git stash pop
阅读全文
摘要:1.内容冲突产生冲突的原因:两个用户修改了同一个文件的同一块区域,git会报告内容冲突。我们常见的都是这种。解决冲突的办法:编辑冲突文件,修改冲突。例如:冲突文件test.ctest.c发生冲突后的内容如下:#include #include ++>>>>>>9d201a9c61bc4713f409...
阅读全文
摘要:创建新仓库创建新文件夹,打开,然后执行git init以创建新的 git 仓库。检出仓库执行如下命令以创建一个本地仓库的克隆版本:git clone /path/to/repository如果是远端服务器上的仓库,你的命令会是这个样子:git clone username@host:/path/to...
阅读全文
摘要:git 配置文件git的配置文件位置针对所有用户:/etc/gitconfig针对当前用户: ~/.gitconfig查看配置的方法git config --list修改配置的方法git config --global user.name "wangyubin" (修改的是~/.gitconfig...
阅读全文
摘要:$ git checkout main150926$ git rebase weixin-old-remote/main150926注释:weixin-old-remote是远端仓库
阅读全文
摘要:1、进入本地文件夹cd /c/wamp/www/weixin-old2.进入分支,即将该分支切换为活跃分支git checkout main150921_indexfix3、拉取远端改变(weixin-old-remote是远端仓库)git fetch weixin-old-remote4、保存当前...
阅读全文
摘要:git fetch --allgit reset --hard origin/master origin是服务器上的本地仓库master是分支
阅读全文
摘要:1. git remote –v查看远端仓库2. git remote add weixin-old-remote https://git.sprucetec.com/meicai/weixin-old.git添加远端仓库3. git fetch upstream拉取不在本地仓库出现的改变,不会修改...
阅读全文

浙公网安备 33010602011771号