question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Git should be able to automatically track new files

See original GitHub issue

I can make changes to a file in VS Code and Git will track those changes (even though they are not immediately staged, I can stage them easily when committing by using git commit -a). Same thing goes for files that I delete. However, new files that I create are a different story; Git does not track them and thus they are not staged when I use git commit -a. I have used IDEs before that give the option to automatically run git add on a file when I create it. I would like to have the same option in VS Code.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:75
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

18reactions
vscodebot[bot]commented, Jan 17, 2020

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

10reactions
JordanLongstaffcommented, Nov 27, 2019

That’s not a problem for me. If I make a new file with Android Studio (which runs git add on new files upon creation) and then make changes to it, git status shows two changes to the same file, one staged (“new file”) and one not (“modified”). But then if I run git commit -a, both changes will get committed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git - Automatically track all files in a directory - Stack Overflow
It seems that I should be able to commit the entire directory, including any and all new files, in one command without having...
Read more >
2.2 Git Basics - Recording Changes to the Repository
In order to begin tracking a new file, you use the command git add . To begin tracking the README file, you can...
Read more >
Tracking Files in a Git Repository with "git add"
In order to start tracking these files, we need to tell git which ones we want to track. We do this with the...
Read more >
How to enable git auto adding files
I can't find this feature in preferences. In my previous projects newly added files were added to git automatically. But I changed...
Read more >
How to automatically add new files and respect .gitignore? : r/git
How am I able to add arbitrary new files and still respecting the ... This way, I can track, e.g., what packages were...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found