git-reset
Git: How to Undo commit *and* revert to last branch
Uh oh... I mistakenly committed a pretty complex change (including subdirectory and files renames) without really knowing what I am doing (or what Git would be doing).[详细]
2023-03-19 07:56 分类:问答rebasing git branches that were rewritten since branching
I have a git repository and two branches master and st (branched from master). I want to rebase st onto master. However, master has been massively rewritten by somebody else, to be frank I\'m not sure[详细]
2023-03-05 22:23 分类:问答"git rm --cached x" vs "git reset head -- x"?
GitRef.org - Basic: git rm will remove entries from the staging area. This is a bit different from git reset HEAD which \"unstages\"[详细]
2023-03-01 10:27 分类:问答I need to pop up and trash away a "middle" commit in my master branch. How can I do it?
For example, in the following master branch, I need to trash just the commit af5c7bf16e6f04321f966b4231371b21475bc4da, which is the second due to previous rebase:[详细]
2023-02-28 07:02 分类:问答How to cancel a local git commit?
My issue is I 开发者_如何学Chave changed a file e.g.: README, added a new line \'this for my testing line\' and saved the file, then I issued the following commands:[详细]
2023-02-08 04:06 分类:问答How to remove an in-between merge in git?
I want to remove an in-between merge (remove, not squash) and then move the last 2 commits to a new branch.[详细]
2023-02-05 11:36 分类:问答How do I revert a Git repository to a previous commit?
This question's answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions.[详细]
2023-01-24 00:23 分类:问答Move commits from master onto a branch using git
I\'m trying to learn how to use Git effectively and I\'m wondering how I should (good practice/bad practice?) solve the following case:[详细]
2023-01-16 11:41 分类:问答What's the difference between "git reset" and "git checkout"?
I\'ve always thought of git reset and git checkout as the same, in the sense that both bring the project back to a specific commit. However, I feel t开发者_运维百科hey can\'t be exactly the same, as t[详细]
2023-01-14 15:14 分类:问答Git rename directory to another case same name shows containing files as modified always
After the directory TestDirectory was renamed to lower case (testdirectory) all it\'s files (a.html and b.html) are shown as modified and even git reset --hard doesn\'t reset the working tree.[详细]
2023-01-11 14:09 分类:问答