Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Gündelik Hayatta GIT İpuçları

Gündelik Hayatta GIT İpuçları

Phpkonf 2015'te yaptığım sunum.
http://phpkonf.org/

Uğur Özyılmazel

July 26, 2015
Tweet

More Decks by Uğur Özyılmazel

Other Decks in Programming

Transcript

  1. GIT İPUÇLARI G Ü N D E L İ K

    H A Y A T T A Uğur “vigo” Özyılmazel
  2. add add--interactive am annotate apply archive bisect bisect--helper blame branch

    bundle cat-file check-attr check-ignore check-mailmap check-ref-format checkout checkout-index cherry cherry-pick clean clone column commit commit-tree config count-objects credential credential-cache credential-cache--daemon credential-store daemon describe diff diff-files diff-index diff-tree difftool difftool--helper fast-export fast-import fetch fetch-pack filter-branch fmt-merge-msg for-each-ref format-patch fsck fsck-objects gc get-tar-commit-id grep hash-object help http-backend http-fetch http-push imap-send index-pack init init-db instaweb log ls-files ls-remote ls-tree mailinfo mailsplit merge merge-base merge-file merge-index merge-octopus merge-one-file merge-ours merge-recursive merge-resolve merge-subtree merge-tree mergetool mktag mktree mv name-rev notes pack-objects pack-redundant pack-refs patch-id prune prune-packed pull push quiltimport read-tree rebase receive-pack reflog relink remote remote-ext remote-fd remote-ftp remote-ftps remote-http remote-https remote-testsvn repack replace request-pull rerere reset rev-list rev-parse revert rm send-pack sh-i18n--envsubst shell shortlog show show-branch show-index show-ref stage stash status stripspace submodule subtree symbolic-ref tag unpack-file unpack-objects update-index update-ref update-server-info upload-archive upload-pack var verify-commit verify-pack verify-tag web--browse whatchanged write-tree 146+ KOMUT
  3. TAG

  4. * 6006b9c (feature/1a) feature1a added * 26447ed (HEAD -> master)

    JSON service3 file added * 241004e JSON service2 file added * eafcd77 JSON service file added | * 3d118d6 (feature/1) feature1 added |/ * 023ee17 (tag: v0.0.2) "Hello World" string added to index.html * 45e83cb (tag: v0.0.1) Rakefile added for automated tasks * c5bb57d HTML index file added * 7b87937 JS index file added * 4cbb412 RUBY application file added * 1d034b5 PYTHON source file added * ef7d3f5 PHP index file added * fb52add Initial commit v0.0.2-3-g26447ed
  5. * 6006b9c (feature/1a) feature1a added * 26447ed (HEAD -> master)

    JSON service3 file added * 241004e (1) JSON service2 file added * eafcd77 (2) JSON service file added | * 3d118d6 (feature/1) feature1 added |/ * 023ee17 (3) (tag: v0.0.2) "Hello World" string added to index.html * 45e83cb (tag: v0.0.1) Rakefile added for automated tasks * c5bb57d HTML index file added * 7b87937 JS index file added * 4cbb412 RUBY application file added * 1d034b5 PYTHON source file added * ef7d3f5 PHP index file added v0.0.2-3-g26447ed
  6. * 40f6f9b (HEAD -> master) friend added 2 files *

    ae3cc4b (origin/master) 2 files added * 465fea2 Initial commit
  7. The bundle contains this ref: 40f6f9b757c0a21cc9496689a3db11382831f345 refs/heads/master The bundle requires

    this ref: ae3cc4b38c2a3b737a873397c1c086b30bf9d1c5 ~/friends.bundle is okay
  8. * 40f6f9b (friends-master) friend added 2 files * ae3cc4b (HEAD

    -> master) 2 files added * 465fea2 Initial commit
  9. * ca3fdfe (HEAD -> master) file6 added | * 6e5c748

    (feature) file5 added | * 29a8cf0 file4 added |/ * fdadf1f file3 added * 941b2e4 file2 added * 089ee87 file1 added * 61bd5c1 Initial commit
  10. * c035db3 (HEAD -> master) file6 added * 6e5c748 (feature)

    file5 added * 29a8cf0 file4 added * fdadf1f file3 added * 941b2e4 file2 added * 089ee87 file1 added * 61bd5c1 Initial commit
  11. * 7d0bc97 Added yet another missing text to README *

    4ff7ba1 Added another missing text to README * 31f1560 Added missing text to README * dcb8071 JSON service3 file added - amend * bb2f23b JSON service2 file added * 2911c52 JSON service file added
  12. * 7d0bc97 Added yet another missing text to README *

    4ff7ba1 Added another missing text to README * 31f1560 Added missing text to README * dcb8071 JSON service3 file added - amend * bb2f23b JSON service2 file added * 2911c52 JSON service file added
  13. pick 31f1560 Added missing text to README pick 4ff7ba1 Added

    another missing text to README pick 7d0bc97 Added yet another missing text to README pick 31f1560 Added missing text to README squash 4ff7ba1 Added another missing text to README squash 7d0bc97 Added yet another missing text to README
  14. # This is a combination of 3 commits. # The

    first commit's message is: Added missing text to README # This is the 2nd commit message: Added another missing text to README # This is the 3rd commit message: Added yet another missing text to README # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Wed Jul 15 09:05:25 2015 +0300 # # rebase in progress; onto dcb8071 # You are currently editing a commit while rebasing branch 'master' on 'dcb8071'. # # Changes to be committed: # modified: README.md #
  15. 917b8ea README file updated dcb8071 JSON service3 file added -

    amend bb2f23b JSON service2 file added 2911c52 JSON service file added
  16. * c2109ee (HEAD -> master) did many things * 3c7b147

    file2 added * c502494 file1 added * 41b8cc1 init
  17. rebase in progress; onto 3c7b147 You are currently editing a

    commit while rebasing branch 'master' on '3c7b147'. (use "git commit --amend" to amend the current commit) (use "git rebase --continue" once you are satisfied with your changes) Untracked files: (use "git add <file>..." to include in what will be committed) test_file1 test_file2 test_file3 test_file4 nothing added to commit but untracked files present (use "git add" to track)
  18. * 82d30b2 (HEAD -> master) test_file3 and test_file4 added *

    ed68764 test_file1 and test_file2 added * 3c7b147 file2 added * c502494 file1 added * 41b8cc1 init
  19. * c2109ee (HEAD -> master) did many things * 3c7b147

    file2 added * c502494 file1 added * 41b8cc1 init
  20. LOG

  21. * 83d0d2d (HEAD -> master, origin/master, origin/HEAD) added what_is_my_public_ip alias

    for showing public ip address * d485193 Docker IP support for PS1 * 4d9679d gentoo specific fixes * 9a4b867 Merge branch 'master' of github.com:vigo/dotfiles-universal |\ | * 09b9f6d mysql prompt fixed * | 13dbcc5 nano 2.4.2 support |/ * 91a3a86 virtualenv prompt fix: display django version info if django exists * cd1990b mysql.server status indicator for PS1 * f3f39fe Screen shot updated * 5af3b2f AirDrop / Ethernet hack added to osx tweaks * 60c916e Merge branch 'master' of github.com:vigo/dotfiles-universal |\ | * 60bedb1 nano version 2.4.1 for nanorc * | b84ba0b ctags files are ignored |/ * 2a434d6 virtualenv, python and django version info for prompt * ae39932 bash-completion for django: manage.py and django-admin.py
  22. commit dcb807137280386cdc1d38e2327656d1c088124c Author: Uğur Özyılmazel <[email protected]> Date: Tue Jul 14

    13:41:39 2015 +0300 JSON service3 file added - amend Notes: Bu bir test notudur!
  23. 8670327 HEAD@{0}: checkout: moving from master to feature2 8670327 HEAD@{1}:

    cherry-pick: file2-a added 3c7b147 HEAD@{2}: checkout: moving from feature to master af2a355 HEAD@{3}: commit: file2-a added 3c7b147 HEAD@{4}: checkout: moving from master to feature 3c7b147 HEAD@{5}: commit: file2 added c502494 HEAD@{6}: commit: file1 added 41b8cc1 HEAD@{7}: commit (initial): init
  24. 8670327 HEAD@{0}: checkout: moving from master to feature2 8670327 HEAD@{1}:

    cherry-pick: file2-a added 3c7b147 HEAD@{2}: checkout: moving from feature to master af2a355 HEAD@{3}: commit: file2-a added 3c7b147 HEAD@{4}: checkout: moving from master to feature 3c7b147 HEAD@{5}: commit: file2 added c502494 HEAD@{6}: commit: file1 added 41b8cc1 HEAD@{7}: commit (initial): init
  25. 3c7b147 HEAD@{0}: reset: moving to 3c7b147 8670327 HEAD@{1}: checkout: moving

    from 3c7b14747431c36db72775d00db2e76e8775ba47 to master 3c7b147 HEAD@{2}: checkout: moving from feature2 to 3c7b147 8670327 HEAD@{3}: checkout: moving from master to feature2 8670327 HEAD@{4}: cherry-pick: file2-a added 3c7b147 HEAD@{5}: checkout: moving from feature to master af2a355 HEAD@{6}: commit: file2-a added 3c7b147 HEAD@{7}: checkout: moving from master to feature 3c7b147 HEAD@{8}: commit: file2 added c502494 HEAD@{9}: commit: file1 added 41b8cc1 HEAD@{10}: commit (initial): init
  26. Kısa açıklama maksimum 50 karakterden oluşmalı Daha detaylı açıklamalar paragraflar

    halinde uzun uzun yazılabilir ve 72 karakter boyunda satırlardan oluşması önerilmektedir. Örneğin GitHub, commit mesajının title'i yani başlığı olarak ilk satırı göstermektedir. Paragraflar arasında 1 satır boşluk bırakılması önerilir. - Bullet list ya da liste şekli - Yine birer satır aralık verilmesi önerilir. * Çizgi / Dash yerine yıldız da kullanılabilir
  27. $ git add -p diff --git a/file1 b/file1 index 70177a7..2d2e1d1

    100644 --- a/file1 +++ b/file1 @@ -1,2 +1,4 @@ Hello World Hello World as second line +Hello World as 3rd line +Hello World as 4th line Stage this hunk [y,n,q,a,d,/,e,?]? ? y - stage this hunk n - do not stage this hunk q - quit; do not stage this hunk or any of the remaining ones a - stage this hunk and all later hunks in the file d - do not stage this hunk or any of the later hunks in the file g - select a hunk to go to / - search for a hunk matching the given regex j - leave this hunk undecided, see next undecided hunk J - leave this hunk undecided, see next hunk k - leave this hunk undecided, see previous undecided hunk K - leave this hunk undecided, see previous hunk s - split the current hunk into smaller hunks e - manually edit the current hunk ? - print help @@ -1,2 +1,4 @@ Hello World Hello World as second line +Hello World as 3rd line +Hello World as 4th line Stage this hunk [y,n,q,a,d,/,e,?]?
  28. * 82d30b2 (HEAD -> master) test_file3 and test_file4 added *

    ed68764 test_file1 and test_file2 added * 3c7b147 file2 added * c502494 file1 added * 41b8cc1 init
  29. * 82d30b2 (HEAD -> master, refs/bisect/bad) test_file3 and test_file4 added

    * ed68764 test_file1 and test_file2 added * 3c7b147 file2 added * c502494 file1 added * 41b8cc1 init
  30. Bisecting: 0 revisions left to test after this (roughly 0

    steps) [ed68764cd0098bf143248e8d293d6c1a0ac2d848] test_file1 and test_file2 added
  31. * 82d30b2 (master, refs/bisect/bad) test_file3 and test_file4 added * ed68764

    (HEAD) test_file1 and test_file2 added * 3c7b147 (refs/bisect/good-3c7b14747431c36db72775d00db2e76e8775ba47) file2 added * c502494 file1 added * 41b8cc1 init