What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2022-03-10 15:45:04
git lost commit after reset
git reflog is your friend. Find the commit that you want to be on in that list and you can reset to it for example:git reset --hard e870e41 (If you didn't commit your changes... you might be in trouble - commit early, and commit often!) Add solution -
Shell/Bash 2021-10-20 10:52:04
git Automatic merge failed; fix conflicts and then commit the result
# Step 1: # Navigate into the local Git repository that has the merge conflict. cd REPOSITORY-NAME # Step 2: # Generate a list of the files affected by the merge conflict. # In this example, the file styleguide.md has a merge conflict. git status ... Add solution -
Shell/Bash 2021-09-27 16:51:02
git get latest
Case 1: Don’t care about local changes Solution 1: Get the latest code and reset the code git fetch origin git reset --hard origin/[tag/branch/commit-id usually: master] Solution 2: Delete the folder and clone again :D rm -rf [project_folder] git... Add solution -
Other 2021-09-15 14:24:02
how to handle merge conflicts
# Step 1: # Navigate into the local Git repository that has the merge conflict. cd REPOSITORY-NAME # Step 2: # Generate a list of the files affected by the merge conflict. # In this example, the file styleguide.md has a merge conflict. git status ... Add solution