Nathan's Brain
  • Introduction
  • Incubator
  • American Sign Language
  • Art
  • Behavior Change
    • Akrasia
      • Beeminder
      • Procrastination
  • Career
  • Civil Discourse
  • Communication
  • Computer Science
    • Artificial Intelligence
  • Creativity
    • Writing
  • Design
    • Color
    • Design Process
    • Stock
    • Web Design
  • Economics
  • Engineering
  • Entrepreneurship
    • Customer Development
    • Marketing
      • Newsletter Publishing
    • Pricing
  • Environment
    • Energy
    • Transportation
  • Failure & Vulnerability
  • Freelancing
    • Estimating
  • Futurism
  • Governance & Politics
    • Representation & Voting
  • Health
  • Humane Tech
    • Phone Usage
  • Infotainment
  • Linguistics
  • Minimalism
  • Personal Finance
    • FIRE Movement
    • Investing
  • Productivity
    • Attention Management
    • Audio for Focus
    • Automation
    • Task Management
    • Time Management
  • Programming Languages
    • JavaScript
      • Snippets
    • PHP
    • Python
      • Development Environments
      • Package Management & Distribution
  • Psychology
  • Quantified Self
    • Experience Sampling Method
  • Rationality
    • Bayes' Theorem
    • Cognitive Biases
  • Religion
    • Adventism
  • Remote Work
  • Research
    • Note Taking
  • Science
  • Self-Study
    • Accessibility & Usability
    • Algorithms
    • Artificial Intelligence
    • Cryptography
    • Data Science
    • Design Patterns
    • Freelancing
    • Functional Programming
    • Game Development
    • Graphic Design
    • Grid Layout
    • Microservices
    • PWAs
    • SaaS
    • Software Craft
    • Software Management
    • Statistics
    • SVG
    • UI Design
    • Web Animation
  • Software Development
    • API Design
    • Collaboration
    • Command Line
    • git
    • Integrated Development Environments
    • Knoxville Scene
    • Paradigms
    • Refactoring
    • Self-Care
    • Testing
  • Technology History
    • People
    • Timeline
  • Web Development
    • Accessibility & Usability
    • APIs
    • Browsers
    • Content Management Systems
    • CSS
    • Email
    • Frameworks
      • React
    • Libraries
    • No Code & Low Code
    • Performance
    • Serverless
    • Static Sites
    • Testing
    • Twig
    • Type
Powered by GitBook
On this page
  • Snippets
  • Links
  1. Software Development

git

PreviousCommand LineNextIntegrated Development Environments

Last updated 5 years ago

Snippets

Set your commit email address in Git ():

$ git config --global user.email "email@example.com"

Undo your most recent commit ():

$ git commit -m "Something terribly misguided"
$ git reset HEAD~
<< edit files as necessary >>
$ git add ...
$ git commit -c ORIG_HEAD

Move an existing submodule within the same git repository ():

git mv old/submod new/submod

Resolve a detached head ():

git branch temp # base new branch on detached head
git checkout master
git merge temp
git branch -d temp

Make an empty commit (good for debugging CI):

git commit --allow-empty -m "Empty commit to trigger post_receive hooks"
git submodule update --init --recursive

Links

      • git cherry-pick --no-commit 4..8

    • git cherry-pick <SHA of commit to cherry-pick>

    • git checkout -- file

Initialize all submodules recursively ():

- "A specification for adding human and machine readable meaning to commit messages"

- "Git is hard: screwing up is easy, and figuring out how to fix your mistakes is nigh on impossible. Git documentation has this chicken and egg problem where you can't search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem."

#article - “Apply the changes introduced by some existing commits”

#article

#article - “After working with branch per feature for a while any Git-repository becomes a mess of outdated and not finished branches. To deal with this issue, we need to clean-up three kinds of branches…”

#article

#article

#software - "Focus on what matters instead of fighting with Git. Whether you're new to Git or a seasoned user, GitHub Desktop simplifies your development workflow."

#software - “The legendary Git GUI client for Windows, Mac and Linux”

#software - “Work quickly, safely, and without headaches. The Git interface you've been missing all your life has finally arrived.”

#article - git config --global core.excludesfile '~/.gitignore'

#article

- "🐶 Git hooks made easy"

#article - “In bash in Mac OS X, you can use [TAB] to autocomplete file paths. Wouldn’t it be nice if you could do the same with git commands and branch names?”

- “Good-lookin' diffs. Actually… nah… The best-lookin' diffs. 🎉”

#article

source
source
source
source
source
Conventional Commits
Dangit, git!
Git-cherry-pick
Applying git commits to working tree unadded?
Git housekeeping tutorial: clean-up outdated branches in local and remote repositories
Git: How to rebase your feature branch from one branch to another
How do I properly force a Git push?
GitHub Desktop
GitKraken
GitUp
Global Git ignore
How to copy commits from one branch to another?
Husky
Quick Tip: Autocomplete Git Commands and Branch Names in Bash
so-fancy/diff-so-fancy
Undo working copy modifications of one file in Git?