Answer the question
In order to leave comments, you need to log in
What is the correct way to do "git pull to update" to get changes from one folder to another on the same computer?
Hello.
The background of the question is here: https://toster.ru/q/607491?e=7339611#answer_item_1...
I did as advised: cd /home/user && git clone /home/user/repo deploy
and it works! Files from one folder have been copied to another. But then they told me this: "The /home/user/deploy folder will be created with a copy of the repository, you can do git pull to update there" - but they didn't say exactly how to "do git pull to update".
Write please, who knows how it is?
In fact, I need to synchronize two folders on the same server using Git (so that there is also version control). This is me for the clarity of the original goal.
2. And then the second thing: what is the easiest way for me to copy all these things from a remote server from a local laptop under Windows 7? I’m not ready to deploy a repository with web access remotely, but is it possible to somehow synchronize this Git locally with SSH?
Thank you.
Answer the question
In order to leave comments, you need to log in
You won't get a simple two-command instruction. Just because they need a little more than two for normal operation. Closer to ten.
In principle, you can write several sh scripts that will hide all the insides, but this is before the first conflict.
In any case, you will need to know what add, commit, pull, push, checkout and merge are. And sooner or later, some clues to them.
The book is here: https://git-scm.com/book/ru/v2
It's bad that you don't work with a search engine, but wait for someone to give you a magic pill.
This is bad, you need to study and study.
In one repository, make changes and do a git commit to some branch, say master.
Then make a clone of this repository, yes.
Then in the new one, do git checkout master, go to the master.
Or to some other.
Then do a git pull.
Pull all the changes in this way. Every time you pull, they will pull up.
But you need to learn, because this instruction is for a specific problem.
But step left, step right, and you'll need other commands.
Git needs to be learned. :-)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question