k88hudson/git-flight-rules: Flight rules for git


341 bookmarks. First posted by brianloveswords july 2014.


Useful compendium of git tasks and solutions:
from twitter_favs
16 days ago by rukku
What are "flight rules"?
A guide for astronauts (now, programmers using Git) about what to do when things go wrong.

Flight Rules are the hard-earned body of knowledge recorded in manuals that list, step-by-step, what to do if X occurs, and why. Essentially, they are extremely detailed, scenario-specific standard operating procedures. [...]

NASA has been capturing our missteps, disasters and solutions since the early 1960s, when Mercury-era ground teams first started gathering "lessons learned" into a compendium that now lists thousands of problematic situations, from engine failure to busted hatch handles to computer glitches, and their solutions.

— Chris Hadfield, An Astronaut's Guide to Life.
git  reference  github 
may 2018 by rdark
GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
git 
may 2018 by geetarista
This is a good troubleshooting for git.
git  resources  howto  troubleshooting 
march 2018 by lpuerto
Flight Rules are the hard-earned body of knowledge recorded in manuals that list, step-by-step, what to do if X occurs, and why. Essentially, they are extremely detailed, scenario-specific standard operating procedures.
git  github  flightrules  reference  tips  howto  guide 
february 2018 by spaceninja
Github repo
Name: git-flight-rules
Tagline: Flight rules for git
Languages:

# Flight rules for Git

🌍
*[English](README.md) ∙ [Русский](README_ru.md) ∙ [简体中文](README_zh-CN.md)*

#### What are "flight rules"?

A [guide for astronauts](https://www.jsc.nasa.gov/news/columbia/fr_generic.pdf) (now, programmers using Git) about what to do when things go wrong.

> *Flight Rules* are the hard-earned body of knowledge recorded in manuals that list, step-by-step, what to do if X occurs, and why. Essentially, they are extremely detailed, scenario-specific standard operating procedures. [...]

> NASA has been capturing our missteps, disasters and solutions since the early 1960s, when Mercury-era ground teams first started gathering "lessons learned" into a compendium that now lists thousands of problematic situations, from engine failure to busted hatch handles to computer glitches, and their solutions.

— Chris Hadfield, *An Astronaut's Guide to Life*.

#### Conventions for this document

For clarity's sake all examples in this document use a customized bash prompt in order to indicate the current branch and whether or not there are staged changes. The branch is enclosed in parentheses, and a `*` next to the branch name indicates staged changes.

[![Join the chat at https://gitter.im/k88hudson/git-flight-rules](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/k88hudson/git-flight-rules?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Editing Commits](#editing-commits)
- [What did I just commit?](#what-did-i-just-commit)
- [I wrote the wrong thing in a commit message](#i-wrote-the-wrong-thing-in-a-commit-message)
- [I committed with the wrong name and email configured](#i-committed-with-the-wrong-name-and-email-configured)
- [I want to remove a file from the previous commit](#i-want-to-remove-a-file-from-the-previous-commit)
- [I want to delete or remove my last commit](#i-want-to-delete-or-remove-my-last-commit)
- [Delete/remove arbitrary commit](#deleteremove-arbitrary-commit)
- [I tried to push my amended commit to a remote, but I got an error message](#i-tried-to-push-my-amended-commit-to-a-remote-but-i-got-an-error-message)
- [I accidentally did a hard reset, and I want my changes back](#i-accidentally-did-a-hard-reset-and-i-want-my-changes-back)
- [Staging](#staging)
- [I need to add staged changes to the previous commit](#i-need-to-add-staged-changes-to-the-previous-commit)
- [I want to stage part of a new file, but not the whole file](#i-want-to-stage-part-of-a-new-file-but-not-the-whole-file)
- [I want to add changes in one file to two different commits](#i-want-to-add-changes-in-one-file-to-two-different-commits)
- [I want to stage my unstaged edits, and unstage my staged edits](#i-want-to-stage-my-unstaged-edits-and-unstage-my-staged-edits)
- [Unstaged Edits](#unstaged-edits)
- [I want to move my unstaged edits to a new...
github  programming  github-starred-to-pinboard  crypto 
february 2018 by brianyang
Editing Commits
What did I just commit?
I wrote the wrong thing in a commit message
I committed with the wrong name and email configured
I want to remove a file from the previous commit
I want to delete or remove my last commit
Delete/remove arbitrary commit
I tried to push my amended commit to a remote, but I got an error message
I accidentally did a hard reset, and I want my changes back
Staging
I need to add staged changes to the previous commit
I want to stage part of a new file, but not the whole file
I want to add changes in one file to two different commits
I want to stage my unstaged edits, and unstage my staged edits
Unstaged Edits
I want to move my unstaged edits to a new branch
I want to move my unstaged edits to a different, existing branch
I want to discard my local uncommitted changes (staged and unstaged)
I want to discard specific unstaged changes
I want to discard specific unstaged files
I want to discard only my unstaged local changes
I want to discard all of my untracked files
Branches
I want to list all branches
Create a branch from a commit
I pulled from/into the wrong branch
I want to discard local commits so my branch is the same as one on the server
I committed to master instead of a new branch
I want to keep the whole file from another ref-ish
I made several commits on a single branch that should be on different branches
I want to delete local branches that were deleted upstream
I accidentally deleted my branch
I want to delete a branch
I want to delete multiple branches
I want to rename a branch
I want to checkout to a remote branch that someone else is working on
I want to create a new remote branch from current local one
I want to set a remote branch as the upstream for a local branch
I want to set my HEAD to track the default remote branch
I made changes on the wrong branch
Rebasing and Merging
I want to undo rebase/merge
I rebased, but I don't want to force push
I need to combine commits
Safe merging strategy
I need to merge a branch into a single commit
I want to combine only unpushed commits
I need to abort the merge
Check if all commits on a branch are merged
Possible issues with interactive rebases
The rebase editing screen says 'noop'
There were conflicts
Stash
Stash all edits
Stash specific files
Stash with message
Apply a specific stash from list
Finding
I want to find a string in any commit
I want to find by author/committer
I want to list commits containing specific files
Find a tag where a commit is referenced
Submodules
Clone all submodules
Remove a submodule
Miscellaneous Objects
Restore a deleted file
Delete tag
Recover a deleted tag
Deleted Patch
Exporting a repository as a Zip file
Tracking Files
I want to change a file name's capitalization, without changing the contents of the file
I want to overwrite local files when doing a git pull
I want to remove a file from Git but keep the file
I want to revert a file to a specific revision
Configuration
I want to add aliases for some Git commands
I want to add an empty directory to my repository
I want to cache a username and password for a repository
I want to make Git ignore permissions and filemode changes
I've no idea what I did wrong
git  curated 
february 2018 by ethack
What are "flight rules"? A guide for astronauts (now, programmers using Git) about what to do when things go wrong. Flight Rules are the hard-earned body of…
from instapaper
january 2018 by oli
More extensive discussion of how to use Git to fix things when they’ve done mildly or horribly wrong.
git 
december 2017 by pholbrook
Flight Rules are the hard-earned body of knowledge recorded in manuals that list, step-by-step, what to do if X occurs, and why. Essentially, they are extremely detailed, scenario-specific standard operating procedures. [...]
git 
december 2017 by colinn
A guide for astronauts (now, programmers using Git) about what to do when things go wrong.
git 
december 2017 by thecrumb
> Flight rules for git
reference  github  guide  tutorial  git  merge  tips  cheatsheet 
december 2017 by jefftriplett
git-flight-rules - Flight rules for git
git  cheatsheet  reference  coding 
december 2017 by maed
Flight rules for git. ie. how do I fix this situation.
git 
december 2017 by raygrasso
git-flight-rules - Flight rules for git
git 
november 2017 by derekharmel
What are "flight rules"? A guide for astronauts (now, programmers using git) about what to do when things go wrong. Flight Rules are the hard-earned body of…
from instapaper
november 2017 by svs
git-flight-rules - Flight rules for git
november 2017 by konker
da-n starred k88hudson/git-flight-rules
from:ifttt  github 
november 2017 by da_n
what to do when things go wrong
git 
november 2017 by groenewege
NASA has been capturing our missteps, disasters and solutions since the early 1960s, when Mercury-era ground teams first started gathering "lessons learned" into a compendium that now lists thousands of problematic situations, from engine failure to busted hatch handles to computer glitches, and their solutions. Running git diff --cached will show you which lines you have staged compared to which are still saved locally. Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. If someone has sent you a pull request on GitHub, but then deleted their original fork, you will be unable to clone their repository or to use git am as the .diff, .patch urls become unavailable. GitExtensions - a shell extension, a Visual Studio 2010-2015 plugin and a standalone Git repository tool.
november 2017 by sechilds
Flight Rules are the hard-earned body of knowledge recorded in manuals that list, step-by-step, what to do if X occurs, and why. Essentially, they are extremely detailed, scenario-specific standard operating procedures.
git  tips 
november 2017 by tero
I started writing Flight rules for git because who hasn't had an oh-crap-what-do-I-do moment? Contributions welcome
november 2017 by leonbarnard
I started writing Flight rules for git because who hasn't had an oh-crap-what-do-I-do moment? Contributions welcome
november 2017 by heme
Flight rules for git
git  cheatsheet  tips 
november 2017 by segfault
What are "flight rules"?

A guide for astronauts (now, programmers using git) about what to do when things go wrong.

Flight Rules are the hard-earned body of knowledge recorded in manuals that list, step-by-step, what to do if X occurs, and why. Essentially, they are extremely detailed, scenario-specific standard operating procedures. [...]

NASA has been capturing our missteps, disasters and solutions since the early 1960s, when Mercury-era ground teams first started gathering "lessons learned" into a compendium that now lists thousands of problematic situations, from engine failure to busted hatch handles to computer glitches, and their solutions.

— Chris Hadfield, An Astronaut's Guide to Life.
git  reference  tips 
november 2017 by aerosolkid
git-flight-rules - Flight rules for git
git  reference  cheatsheet 
november 2017 by kwbr
suhlig starred k88hudson/git-flight-rules
github  IFTTT  pinboard-fixup-github-titles 
november 2017 by suhlig