![]() Situations like how to pull changes without committing local files, save uncommitted changes in the current branch and switch, add new changes to the last commit, reset my local branch to main, revert the latest commit from local and remote, etc. When I collaborate with others using Git, I often have to google to find the right git commands for various situations. Clean up a fork and restart it from the upstream. ![]() Revert all local changes and local commits (local).Revert last remote commit (remote, untraceable).Revert last local commit but keep the changes in my pc.Discard all uncommitted changes (local).Copy specific commit from one branch to another.clone uncommitted changes to new branch.Save uncommitted changes and switch branch.move uncommitted changes to another branch.Git pull without committing local changes.Git stash - locally store changes without commit.Open file from another branch w/o switching.push all changes from dev branch to main branch (sync main).Change origin (link to different repo URL on github). ![]() Create new local version branch of an upstream branch.create local branch from some other branch.Create new branch from a specific commit. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |