nhu*_*uvy 2 git github git-fork
今天我尝试同步叉库(https://github.com/donhuvy/spring-boot/)从源代码库(https://github.com/spring-projects/spring-boot).
cd /d Desktop
git clone https://github.com/donhuvy/spring-boot.git
cd spring-boot
git remote add upstream https://github.com/spring-projects/spring-boot.git
git fetch upstream
git checkout master
git merge upstream/master
git push
Run Code Online (Sandbox Code Playgroud)
然后我在Windows弹出的diaglog中输入我的用户名,密码,等一下,Git告知成功.这是我的具体提交:https://github.com/donhuvy/spring-boot/commit/e62da83292c69aa97bbe9135ff337a11f8b87bb8
我使用gitWindows操作系统(Git 2.8.3.windows.1)的命令.
cmd问我用户名和密码,我在将源代码推送到我自己的fork存储库之前输入它.但我的帐户不显示为提交者,它显示为计算机的名称(DCV),它不是我的名字/我的Github帐户(donhuvy).我如何做我想要的(我更喜欢使用命令行而不是GitHub桌面用于Windows GUI)?
在Windows上,您可以使用以下两种方法之一:
安装GitHub桌面并登录到您的github帐户
要么
git config --global user.name "<your github username>"
git config --global user.email <github email>
Run Code Online (Sandbox Code Playgroud)