How to synchronize the development environment using Git

Asked 2 years ago, Updated 2 years ago, 86 views

I am using Git for the first time.
The reason is that I wanted to develop it while accessing it from my home PC and university PC.When I wanted to work at home and continue at university, I uploaded it on Google drive, but I want to manage it more efficiently.I understand the Git command to some extent, but it is not convenient to use.

What I want to know is, for example, after some local work, I commit and push to the remote repository to merge, but I want to continue working at the university, but I clone the latest version every time.At this time, I deleted the files that I was working on until the last time in the local area, but I think this is troublesome.If you're actually using Git, how do you dispose of any previous versions of files that remain locally when you clone and make improvements to the latest version you brought?

git github

2022-09-30 19:16

2 Answers

You do not need to clone every time.

branches should be stated on the assumption that you understand
If you pushed push at home,

at university fetch and merge
Or
pull
Then you can resume from the next


2022-09-30 19:16

Consider git clone a command to execute only the first time when you are about to start synchronizing with a remote repository such as GitHub or want to retrieve only the latest version of the file.

After configuring the required synchronization settings, git pull or git push synchronizes the difference between local and remote.


2022-09-30 19:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.