GitHub Desktop only detects changes when the code is saved - github

GitHub Desktop doesn't detect any code changes in real-time. It only displays "No local changes".
It only displays changes once I've saved the file in Visual Studio Code.
before saving
after saving
GitHub Desktop after saving the file in VSCode
How do I make it detect changes in real time?

I did what ElpieKay said, I enabled autosave on focus change in the settings of VS Code. Now GitHub will detect changes in real-time.

Related

If I accidentally discarded the unstashed changes in VS CODE. Is there a way to recover those changes (not deleting files)?

I used VS Code for angular and VS 2022 for the backend. I implemented the codes using VS 2022 for the backend and then closed VS 2022. Then I accidentally hit revert all changes in VS Code and caused the changes to be lost. Those changes are uncommitted and unstashed. Is there any way to recover those changes?
Tried AppData\Roaming\Code\Backups\a0bb9f3e4045ff1cafbc2c6c038fa8a9\file but nothing inside. Tried the recycle bin and nothing was there.
Check if your VSCode has the timeline view activated.
If yes, try and recreate an (empty) file that was discarded, and see if the timeline view shows any history: you would be able to get back its content from it.
However, that process does not scale well, as you would need to recreate every discarded file.

Visual code git features not working out of sudden

Out of sudden I noticed the git options not working in my visual code editor. All I see are the plain text, they used to be segment in different background color and also links where I can click to accept incoming/remain current changes etc..
Current problem is showing this
Should be like this
In VS code there is another way to merge code conflicts which you can find
Settings -> Git Merge (under user tab).
just uncheck that and then it will show you Merge options on your page like you are looking for.
Hope this helps.

VsCode - Source control shows multiple copies of file changes

For some reason, whenever there's a change in a file, VsCode creates multiple copies for each change which are shown in the source control, I don't know why has that started to happen:
A vsCode extension called Local History for maintaining local history of files, when enabled, creates a copy of the old contents kept in the local history, every time you modify a file.
Disabling the extension was the solution here! :)

View changes gitlab in visual studio code

I am using visual studio code to develop my flutter app.
I need to share it with a colleague. I was able to make the transfer on gitlab very easily.
I have a problem.
When my colleague makes changes to my code, before "taking" his changes I would like to be able to view them on visual studio code.
I have tried several avenues, but each time my code is synchronized and modified according to the changes made
Can anyone help me?
1:Click Git icon on left side of VS Code
2:If you've made changes to the file(s) since last commit, you'll see the file(s) listed under "CHANGES"
3:Right click the file name (under "CHANGES") and click "Open Changes"
4:This will open the two versions of the file side by side with the changes highlighted
I believe this is how you see the changes that your college made on GitLab

Source control not working in Visual Studio Code

When using source control every change showes up as they should, but when I try to commit, push, pull etc nothing happens. This happens with both old and new projects. I have tried to reinstall the app without any luck. How can I fix this? Is there a way to "reset" source control?