git push says "everything up-to-date" even though I have local changes
2023-06-07
Question I have a remote gitosis server and a local git repository, and each time I make a big change in my code, I'll push the changes to that server too. But today I find that even though I have some local changes and commit to local repository, when running git push origin master it says 'Everything up-to-date', but when I use git clone to checkout files on the remote server, it doesn't contain latest changes.…
git revert back to certain commit [duplicate]
2023-06-06
Question This question already has answers here: </div> How do I revert a Git repository to a previous commit? (41 answers) Closed 9 years ago. how do i revert all my files on my local copy back to a certain commit? commit 4a155e5b3b4548f5f8139b5210b9bb477fa549de Author: John Doe <Doe.John.10@gmail.com> Date: Thu Jul 21 20:51:38 2011 -0500 This is the commit i'd like to revert back to. any help would be a lifesaver!…
How can I move HEAD back to a previous location? (Detached head) & Undo commits
2023-06-06
Question In Git, I was trying to do a squash commit by merging in another branch and then resetting HEAD to the previous place via: git reset origin/master But I need to step out of this. How can I move HEAD back to the previous location? I have the SHA-1 fragment (23b6772) of the commit that I need to move it to. How can I get back to this commit?…
Using Git with Visual Studio [closed]
2023-06-06
Question Closed. This question is opinion-based. It is not currently accepting answers. </div> Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 9 years ago. Improve this question As a long-time Visual SourceSafe user (and hater) I was discussing switching to SVN with a colleague; he suggested using Git instead. Since, apparently, it can be used as peer-to-peer without a central server (we are a 3-developer team).…
What's the strategy for handling CRLF (carriage return, line feed) with Git?
2023-06-06
Question I tried committing files with CRLF-ending lines, but it failed. I spent a whole work day on my Windows computer trying different strategies and was almost drawn to stop trying to use Git and instead try Mercurial. How to properly handle CRLF line endings? Answer Almost four years after asking this question, I have finally found an answer that completely satisfies me! See the details in github:help's guide to Dealing with line endings.…
Remove folder and its contents from git/GitHub's history
2023-06-05
Question I was working on a repository on my GitHub account and this is a problem I stumbled upon. Node.js project with a folder with a few npm packages installed The packages were in node_modules folder Added that folder to git repository and pushed the code to github (wasn't thinking about the npm part at that time) Realized that you don't really need that folder to be a part of the code Deleted that folder, pushed it At that instance, the size of the total git repo was around 6MB where the actual code (all except that folder) was only around 300 KB.…
Why should I care about lightweight vs. annotated tags?
2023-06-04
Question I switched from Subversion to Git as my day-to-day VCS last year and am still trying to grasp the finer points of "Git-think". The one which has been bothering me lately is "lightweight" vs. annotated vs. signed tags. It seems pretty universally accepted that annotated tags are superior to lightweight tags for all real uses, but the explanations I've found for why that's the case always seem to boil down to either "…