Hasty Briefsbeta

Bilingual

Useful Git

a year ago
  • #Git
  • #Programming
  • #Version Control
  • Introduction to advanced Git commands and practices.
  • Modern branch switching with `git switch`.
  • Merging branches using `git merge` and resolving conflicts.
  • Rebasing branches for a linear history with `git rebase`.
  • Resolving merge conflicts with `--ours` and `--theirs`.
  • Temporarily saving changes with `git stash`.
  • Undoing changes with `git reset` (soft and hard options).
  • Reverting commits without rewriting history using `git revert`.
  • Applying specific commits from one branch to another with `git cherry-pick`.
  • Finding bug-introducing commits using `git bisect`.
  • Squashing commits for cleaner history in pull requests.
  • Managing multiple branches simultaneously with `git worktree`.
  • Tagging important commits like releases with `git tag`.
  • Amending the last commit with `git commit --amend`.