Git gui用于windows checkout,分支,提交和拉取更改

d-m*_*man 3 git git-gui github-for-windows

自从过去5年以来我一直在使用SVN,我是GIT的新手,我对基本操作的git存储库使用几乎没有什么困惑,并且通过查看许多教程和视频找不到我的答案,希望有一个人可以从这里回答我的问题题.

我使用GIT GUI成功完成的步骤.

Step 1- I create two folders on the c: Project-clone-1 and project-clone-2
Step 2- Then i clone Project1(which is on github cloud public server) in 'Project-clone-1' then in 'project-clone-2'

What i want to achieve by creating two copies of same repository is to observe if i commit any change from 'Project-clone-1' and then would like to go to 'project-clone-2' to pull and see if changes comes there.

Step 3- i made some change in a file which is inside 'Project-clone-1' i commit and then pushed.

Please remember i have only master branch.
Step 4- Then i went to the 'project-clone-2' from git GUI i do remote -> Fetch from -> origion
Step 5- it shows Fetching new changes from origin master-> orgin-> master (done)
Step 6- when i opened file which i expect to have change in 'project-clone-2' i still see old file ???
Run Code Online (Sandbox Code Playgroud)

当我采取更新时,它没有显示远程更改是否有任何我错过的东西?

我提前感谢您的帮助.

red*_*nce 6

当您git fetch,它不会自动将新内容合并到您的本地分支.

假设您正在尝试将master分支与所调用的远程同步origin.当你git fetch,它抓住master远程仓库上的分支的最新变化并将它们存储在origin/master分支机构中(在你的本地仓库中).这使您有机会在将更改diff合并到本地分支之前查看更改(例如,使用a ).要将这些更改合并到本地master分支,您可以(在主分支中):

git merge origin/master

Git有一个快捷命令来自动获取和合并:git pull.这可能就是你要找的东西.