Git clone vs git pull

For my project, I keep an online repository on githuband local repositories on two computers (for example, A, B), where I write code and run tests, and also on three other machines (say, C, D, E), where I just run tests.

Now, conflicts have occurred several times when I just want to download the updated code in C, D, E, and the execution just git pull origin $someBranchwonโ€™t work, possibly due to small changes that I made to the local source code for testing purposes only and which I donโ€™t I want to save.

What should I do in this case? Should I always do git clone $URLofMyRepositoryor are there less aggressive ways?

+5
source share
1 answer

, , :

git checkout .

, pull.

git pull origin $someBranch

, , pull.

git stash

, , , :

git stash apply
+6

All Articles