Skip to content

Instantly share code, notes, and snippets.

@Horaddrim
Created December 14, 2017 16:15
Show Gist options
  • Select an option

  • Save Horaddrim/258d16a5eebb652a123514801f811716 to your computer and use it in GitHub Desktop.

Select an option

Save Horaddrim/258d16a5eebb652a123514801f811716 to your computer and use it in GitHub Desktop.
Desktop/estudos/git-study on  master
➜ tree .git
.git
├── branches
├── config
├── description
├── HEAD
├── hooks
│   ├── applypatch-msg.sample
│   ├── commit-msg.sample
│   ├── post-update.sample
│   ├── pre-applypatch.sample
│   ├── pre-commit.sample
│   ├── prepare-commit-msg.sample
│   ├── pre-push.sample
│   ├── pre-rebase.sample
│   └── update.sample
├── info
│   └── exclude
├── objects
│   ├── info
│   └── pack
└── refs
├── heads
└── tags
9 directories, 13 files
Desktop/estudos/git-study on  master
➜ echo 'Test Object' | git hash-object -w --stdin
8ebdf24cc3aac3cc2f4da2bf0444580675d58d41
Desktop/estudos/git-study on  master
➜ git cat-file -p 8ebdf24cc3aac3cc2f4da2bf0444580675d58d41
Test Object
Desktop/estudos/git-study on  master
➜ git update-index --add --cacheinfo 100644 8ebdf24cc3aac3cc2f4da2bf0444580675d58d41 test.txt
Desktop/estudos/git-study on  master [✘]
➜ git write-tree
29be58d0362400126f698f5dfb65316e65bb0bfe
Desktop/estudos/git-study on  master [✘]
➜ git cat-file -p 29be58d0362400126f698f5dfb65316e65bb0bfe
100644 blob 8ebdf24cc3aac3cc2f4da2bf0444580675d58d41 test.txt
Desktop/estudos/git-study on  master [✘]
➜ git cat-file -t 29be58d0362400126f698f5dfb65316e65bb0bfe
tree
Desktop/estudos/git-study on  master [✘]
➜ git config user.email "[email protected]"
Desktop/estudos/git-study on  master [✘]
➜ git config user.name "Igor Franca"
Desktop/estudos/git-study on  master [✘]
➜ echo 'Look at my first commit' | git commit-tree 29be58d0362400126f698f5dfb65316e65bb0bfe
04677bcfcc0ede586132c39080477ff0aa763d1a
Desktop/estudos/git-study on  master [✘]
➜ git cat-file -p 04677bcfcc0ede586132c39080477ff0aa763d1a
tree 29be58d0362400126f698f5dfb65316e65bb0bfe
author Igor Franca <[email protected]> 1513264035 -0200
committer Igor Franca <[email protected]> 1513264035 -0200
Look at my first commit
Desktop/estudos/git-study on  master [✘]
➜ echo 'a' | git hash-object -w --stdin
78981922613b2afb6025042ff6bd878ac1994e85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment