Skip to main content
13 events
when toggle format what by license comment
Nov 3, 2019 at 13:45 history edited Peter Mortensen CC BY-SA 4.0
Active reading [<https://en.wiktionary.org/wiki/accidentally#Adverb>].
Jul 30, 2017 at 12:53 comment added ozkary Git reset without Head uses the current staged files. Use git reset head to specified a different commit. Like git reset Head~2 to go back to a previous commits. 2 is number of commits
Mar 26, 2017 at 12:14 comment added Vidura Mudalige Didn't you try "git checkout file_name". Also, you can stash the changes by using "git stash".
Mar 26, 2017 at 11:21 comment added Unbreakable In a more technical terms "How to revert the file changes made in local repo which has not been put in the staging area"
Mar 26, 2017 at 11:10 comment added Unbreakable So I made a change to a file. I did not do anything else. NO git command at all (no git push not even git add or git commit). But now I want a git command which will revert those changes in my local repo.
Mar 26, 2017 at 11:07 comment added Unbreakable basically I want a git command which will revert all the changes which is making the git status to show "red files"
Mar 26, 2017 at 11:06 comment added Unbreakable It did not work. Suppose I did a git push. Now if I add a single line in my code and check git status. It will show a file in Red colour. Suppose I do not want that one line change at all. One option is I can do cntrl + z. But I want git to do that for me. I want my local project to get in sync with the master repo. I mean when I do "git status" then I should see message as "Its in sync with the master". And when I open my code I should have a message like "some external source is making changes" and when I say "Yes" to that prompt then the one line change that I had made shold be gone.
Mar 26, 2017 at 10:20 comment added Vidura Mudalige If you don't want to delete the untracked files, just ignore "-f" flag.
Mar 26, 2017 at 10:19 comment added Vidura Mudalige Hi, I think your question is how to remove untracked files from the current tree. For that, you can use "git clean -f -d". This will remove untracked directories as well.
Mar 26, 2017 at 1:00 comment added Unbreakable When I do git status. I should not see any change at all. All the red files should get reverted.
Mar 26, 2017 at 1:00 comment added Unbreakable SO suppose you are just at step first. And you want to get rid of all the changes you have done which is making "newFile.txt" to come up as red.
Mar 26, 2017 at 0:59 comment added Unbreakable Suppose I am at 1st pic meaning meaning I have not even did "git.add". Also, I not at all want all this change. I mean when I do git status, it should not show any red files. I mean it should be in sync as if there was not a single file altered since the last git push. how to achieve that.
Oct 4, 2016 at 11:02 history answered Vidura Mudalige CC BY-SA 3.0