Git

5 Ways to Undo Mistakes with Git: Discarding Some of Your Local Changes, Resetting a Specific File to a Previous State, Recovering a Lost Revision with the Reflog, Recovering a Deleted Branch, Moving a Commit to a Different Branch

Removing a git commit and force pushing to remove it from history; simonw TILs

How to push to a repo to maintain only one commit – useful if you would otherwise have a whole bunch of data-hogging commits that aren't necessary to keep. From simonw: The latest til.db file is now stored in https://github.com/simonw/til-db – every time I push a new copy of the file there I use git commit --amend to rewrite history followed by git push --force – so that repo only ever contains a single commit which is the commit that added the file. [source]

How to change git master to main note the caveats in the thread

How to remove a pushed commit Committed and pushed incorrect file otd-tweets-by-mcnees (forgot the html extension). I could have dealt with the unpushed change but was in a rush and instead went ahead and committed/pushed corrected version otd-tweets-by-mcnees.html But later I wanted to remove that bad commit/push. Here's how I did it, using procedure from the above web page: git revert e98adc579131244c56913e0d5afbd5ba395bc6c8 Then git status said local repo was ahead of remote by 1 and that a push was needed. So I did the git push. The file then did not show up in the jrdmb/jrdmb github repo.

How to Squash the First Two Commits in a Git Repository — Marius Schulz

Github account security log

Learn to change history with git rebase; git rebase in depth | How does Git Rebase work and compare with Git Merge and Git Interactive Rebase | What is Git Rebase and How Is it Different than Merging? | Change a Git Commit in the Past with Amend and Rebase Interactive – Nick Janetakis | Top 20 git commands and examples caltlgin git wiki tips and commans ref Git: Clear local and remote repo and start over | Git HowTo: revert commit already pushed to remote repository; delete earlier commits | Git and GitHub: How to Revert a Single File | Wiki on git GitHub: Everything you need to know

Git Alternatives Launchpad

Git articles/Tutorials How to Host Your Blog for Free with Jekyll and GitHub Pages | How writers can use github, nice setup/config info | GitHub Project Management | 15 git commands you may not know Especially see #15 on optimizing local repo with 'git gc' jermity Git Notes Glossary with Step Procs | Getting Started | Tutorials | BitBucket 101 | Pro Git online eBook | Learning Git online eBook | How to place the git folder out of your working tree | Remove sensitive data from Git history, bfg | git help: remove sensitive data from repo, bfg | Here's How to Clean Git and Remove Untracked Files

GitHub GetHub Pages | GitHub Project Pages and User Pages | cjeller | Search Syntax | GitHub API | Emoji CheatSheet |

General Portable version of Git for Windows

Gists Amit Agarwal article on Gists Display fiddle from Gist Constant URL for Gist after Editing | Pattern: https://gist.github.com/<USER_NAME>/<GIST_ID>/raw/<GIST_FILE_NAME> Gist API v3 | https://api.github.com/users/username/gists

Use #hashtag in description, so you can search your gists by tags via myusername #tag

http://gistboxapp.com supports searching, editing and labels

http://www.gistoapp.com/ Gisto is a code snippet manager that runs on GitHub Gists and adds additional features such as searching, tagging and sharing gists while including a rich code editor. All your data is stored on GitHub and you can access it from GitHub Gists at any time with changes carrying over to Gisto.

Build A Blog With Jekyll And GitHub Pages

jlord code-life

Wikis Mastering Github Wikis

Markdown Markdown Basics | Cheat Sheet | Mastering Markdown | QuickRef | Learning Markdown (MUO)| Markdown to HTML online: StackEdit.io| Dillinger.io|fiddle.md | John Gruber Markdown Syntax |

Use <sub> and </sub> to for subscripts: H20. Superscripts are <sup> and </sup>: e2.

This is a code block. For inline code blocks, use a single backtick.

Articles About BitBucket Makeuseof: 4 reasons to use it | Lifehacker: 4 alternative to Google Code |

Useful Tips Bitbucket Supported Markdown | Publish Website on BitBucket | TechRepublic: Hosting Static Websites | Portmanteau: VC with BitBucket and Dropbox | Code in the Cloud with BitBucket | Git Explained: Tips and Tricks

HTML stuff

Use <sub> and </sub> for smaller-text subscripts This tag is HTML, not Markdown; example usage: H2O x3 is an option to use instead of x^3 xj3

Hashtags: #devel