Q.
Viewed 73k times
32
5
In Visual Studio Code I made some changes which I do not want to commit en sync yet. However, after my holiday, I want to sync the files from the server (changes from my colleagues). So In Visual Studio Code I want to do a sync.
I get a message "Please clean your repository working tree before checkout"
What do I need to do to get the files of my colleagues without losing my own uncommitted changes?
A.
20
Create a temporary branch and commit the changes. Or if you don't want to create a temporary branch - stash the changes.
Follow
answered Aug 13 '18 at 7:46
47.2k15 gold badges127 silver badges164 bronze badges
-
I will do that, thanks. Additional question. What command do I need to use to clean the repository working tree? – hacking_mike Aug 13 '18 at 8:13
-
2
Committing to temporary branch or stashing the changes will clean the working tree – Eimantas Aug 13 '18 at 11:24
II.
In my experience the best way to is to stash the changes like so: stash
sync the changes from your co-workers and afterwards do stash-pop like so: stash pop
You may also perform these actions in the terminal: git stash git stash pop
'Env Setting > VSCode' 카테고리의 다른 글
Visual Studio Code / FTP(SFTP)로 원격 서버 접속하여 파일 수정하는 방법 (0) | 2021.08.06 |
---|---|
[VS Code] ES Lint: Auto Fix On Save 없을 때 (0) | 2021.01.24 |