![]() We enter the following Git revert /c/revert example/Īnd presto! The charlie.html is gone, as another directory listing will /c/revert example/Īlpha.html beta.html delta.html edison.html That’s the third commit, with the ID of 4945db2. So, we decide that the charlie.html file needs to go. & git commit -m "5th git commit: 5 files"Īfter the initial command batch, we can do a directory listing and see five files residing in the current /c/revert example/Īlpha.html beta.html charlie.html delta.html edison.htmlĪnd the git reflog command reveals the history of the current /c/revert example/ & git commit -m "4th git commit: 4 files" & git commit -m "3rd git commit: 3 files" & git commit -m "2nd git commit: 2 files" Whenever we create a new file, we add it to our Git index and create a new commit that contains a meaningful /c/revert example/ Now, we add five files to the repository (or “repo”). Initialized empty Git repo in C:/git revert example We begin by creating a clean repository with the git init /c/revert example/ Here’s an example of how to revert Git commit using syntax resources from TechTarget. Here’s what the syntax would look like if you wanted to revert a Git commit called 31416p54: The Git revert command syntax is straightforward.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |