HTTP/2 302
server: nginx
date: Mon, 22 Dec 2025 19:18:33 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100212052455
location: https://web.archive.org/web/20100212052455/https://github.com/guides/cool-and-unusual-git-techniques
server-timing: captures_list;dur=0.633110, exclusion.robots;dur=0.061960, exclusion.robots.policy;dur=0.049643, esindex;dur=0.012580, cdx.remote;dur=5.744970, LoadShardBlock;dur=95.897132, PetaboxLoader3.datanode;dur=57.493349, PetaboxLoader3.resolve;dur=35.824239
x-app-server: wwwb-app217-dc8
x-ts: 302
x-tr: 133
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app217; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 22 Dec 2025 19:18:33 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Fri, 12 Feb 2010 05:24:54 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "11203af7f65d23591e8dd6f712f73d69"
x-archive-orig-x-runtime: 98ms
x-archive-orig-content-length: 10199
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Fri, 12 Feb 2010 05:24:55 GMT
link:
; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_14_20100211233328_crawl103-c/51_14_20100212052238_crawl101.arc.gz
server-timing: captures_list;dur=0.505699, exclusion.robots;dur=0.016733, exclusion.robots.policy;dur=0.007826, esindex;dur=0.009856, cdx.remote;dur=9.980643, LoadShardBlock;dur=115.811365, PetaboxLoader3.datanode;dur=125.015740, PetaboxLoader3.resolve;dur=72.200980, load_resource;dur=100.649348
x-app-server: wwwb-app217-dc8
x-ts: 200
x-tr: 269
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
Cool and unusual Git techniques - Guides - GitHub
Guides: Cool and unusual Git techniques
Please, add your favorite cool and unusual Git techniques to this guide!
git add --patch
Lets you commit specific lines rather than whole files.
git add --interactive
--interactive works very similar to --patch, but gives you much more flexibility in choosing what (untracked) files and/or hunks you want to stage.
git stash
Stash away the uncommited changes in your working directory to get a clean HEAD .
Rebasing
Rebasing is neat for cleaning up commits, but you will generally not want to rebase already pushed commits – it becomes messy for others who are working on forks of your repository. If for some reason you really do want to repush rebased commits, you will need to git push -f.
git commit --amend
Add your changes to the last commit instead of a new one.
git rebase --interactive
Rearrange, edit and squash commits.
git cherry-pick
Want to grab only one commit from someone else’s repository? First fetch their changes and then apply the individual commit with git cherry-pick 1111111 (where 1111111 is the beginning of the sha1 hash of the commit you want to apply).
Last edited by Daenyth , 11 months ago
Versions:
Current Version 18 by idlefingers Version 17 by idlefingers Version 16 by seancribbs Version 15 by seancribbs Version 14 by seancribbs Version 13 by dag Version 12 by dag Version 11 by dag Version 10 by dag Version 9 by dag Version 8 by mudge Version 7 by cypher Version 6 by cypher Version 5 by cypher Version 4 by dag Version 3 by dag Version 2 by dag Version 1 by dag