Git

14 posts in this category. ← All writing

Git cherry pick from another branchA git cherry pick tutorial. Check for changes on remote origin Git repository in shell scriptUsing Git rev-parse to check for changes on remote origin git repository in shell script. Git reset origin to commitHow do you reset a Git repository to a certain commit? This example will delete the commits made after the commit you want to reset to, and then we... Git rebaseA quick explanation of Git rebase and how to use it to squash and fixup commits. Git undoGit undo is an extension for git that adds convenient commands to undo commits, applied stashes and pushed merges. Using git commit amendBy using git commit amend you can add files if you forgot to do that to your most recent commit. Commit changes to new branch with gitTo commit changes to new branch with git you can use the following three steps Untrack files in local repository but keep at origin with gitTo untrack files in local repository but keep at origin, as our scenario needed; to keep folder or files in git origin repository but untrack local... git rename branchThis operation is pretty simple, all you need to use is the branch commando with a -m flag to git rename branch. Undo a pushed merge with gitHow to undo a merge that has been pushed to origin? Use Revert. Undo git stash applySometimes we may need to undo a git stash apply, maybe we didn't mean to apply it at all or we just applied it to the wrong branch. Aliasing git reset --soft HEAD^ as git undoI keep forgetting how to undo a commit with git. If i aliased it to git undo i wouldn't need to google the command every time. Gitignore exclude folder but include a subfolderIn a project using Git I have a folder that is added to .gitignore. But i needed to include a subfolder that is tracked by git. A quick git commands refreshWhen using git i like to work with Vincent Driessen's a successful git branching model. This is the short version of the successful branching model.