Gitkraken undo commit6/19/2023 ![]() ![]() If you add a new file to the repository (that isn’t being ignored by git - we’ll dive into git ignore files soon, too!), it will simply exist on disk, and git will know it’s new, but again if you commit now, nothing would actually happen.We have to tell git that the changed file should be committed by “staging” it. If you were to perform a commit on the repository right now, nothing would actually happen. When you make a change to a “tracked” file (a file that has previously been committed to the repository, for example, a file that you received during the cloning process), it simply exists in a changed state on the file system and git knows it changed. ![]() There are three primary reasons you might need to “stage” a file: Let’s get an idea of what it means to “stage” (or “unstage”) your changes in a git repository. In this post, I’m going to show you how to add and remove files - or, in git lingo, stage and unstage files. However, just editing or creating files in the repository doesn’t necessarily mean they’ll be committed, pushed (future topics, I promise), and available for other folks to work with. Now that we have a repository to work with, we need to make some changes! Maybe that involves changing existing files, or adding new ones.
0 Comments
Leave a Reply. |