Advertisement

Versionskontrolle mit Git

Community
Mar. 26, 2023
Advertisement

More Related Content

Advertisement

Recently uploaded(20)

Versionskontrolle mit Git

  1. Mit Git beginnen Alexander Groß agross@therightstuff.de @agross
  2. Vom 21. – 23.10.2011 findet zum vierten Mal der .NET Open Space in Leipzig statt Anmeldung: netopenspace.de
  3. Heute  grundlegende Operationen verstehen  Arbeit mit Servern/im Team  Git Workflow  Cool Stuff
  4. Delta Storage
  5. Snapshot Storage
  6. http://www.flickr.com/photos/saschaaa/152502539/
  7. http://www.flickr.com/photos/mklingo/717372511/
  8. $ git log commit ad9a291416165bb95a541321a7acf9cef9731c1d Author: Alexander Groß <agross@therightstuff.de> Date: Thu Sep 9 15:18:55 2011 +0200 hello, nrwonf
  9. Installation Cygwin msysGit GitExtensions TortoiseGit
  10. C:DontPanic
  11. /c/DontPanic
  12. $ git <verb>
  13. $ git help <verb> $ git <verb> --help
  14. Git Basics
  15. Repository erzeugen $ git init Initialized empty Git repository in /scratch/.git/
  16. Repository herunterladen $ git clone git://github.com/machine/ machine.specifications.git
  17. Änderungen einchecken
  18. Checking… $ git status # On branch master # # Initial commit # nothing to commit (create/copy files and use "git add" to track)
  19. Working… $ touch hello_nrwconf.txt $ git status # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # hello_nrwconf.txt nothing added to commit but untracked files present (use "git add" to track)
  20. Dateien unter Source Control bringen $ git add --all oder: $ git add hello_nrwconf.txt
  21. Dateien unter Source Control bringen $ git status # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to # unstage) # # new file: hello_nrwconf.txt
  22. Commit erzeugen $ git commit –m “hello, nrwconf” [master (root-commit) ea4bdca] hello, nrwconf 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 hello, nrwconf.txt
  23. .gitignore /Source/*/obj /Source/*/bin _ReSharper.* *.user *.suo beinhaltet Dateien und Verzeichnisse die nicht unter Source Control kommen
  24. Protokoll git log gitk –all & git log --oneline git log -10 git log -1 --patch
  25. Arbeiten mit Remotes
  26. Clone $ git clone git@github.com:machine/ machine.specifications.git Cloning into machine.specifications... remote: Counting objects: 10409, done. remote: Compressing objects: 100% (2986/2986), done. remote: Total 10409 (delta 7402), reused 10090 Receiving objects: 100% (10409/10409), 108.96 MiB. Resolving deltas: 100% (7402/7402), done. $ cd machine.specifications $ git remote origin
  27. Remote-Operationen $ git fetch origin $ git push origin master $ git pull origin master *
  28. http://www.flickr.com/photos/sethponek/1581346753
  29. Git Server  Windows File Share git clone //server/repository.git  SSH-Server mit Public Key-Authentifizierung und granularen Benutzerberechtigungen http://bit.ly/oZbhtt git clone git@server:repository.git
  30. http://www.flickr.com/photos/wyrmworld/4837749008
  31. Ein Commit
  32. Mehrere Commits
  33. Branches
  34. Branch erzeugen $ git branch testing $ git checkout -b testing
  35. Der HEAD
  36. Branch wechseln $ git checkout testing
  37. Änderung committen $ git commit -m „work on testing“
  38. Zurückwecheln $ git checkout master
  39. Eine weitere Änderung $ git commit –m „work on master“
  40. Divergente Commits
  41. Ein Merge $ git checkout master $ git merge experiment
  42. Rebase $ git checkout experiment $ git rebase master
  43. Fast-forward merge $ git checkout master $ git merge experiment
  44. Regeln http://www.flickr.com/photos/smolianitski/4818714313/
  45. http://www.flickr.com/photos/lisaconnolly/27339281
  46.  git cherry-pick  git commit --amend  git rebase --interactive  git stash  git {add|reset|rm|log|…} --patch  git reflog  git bisect
  47. gitflow
  48. Link therightstuff.de/download/git.zip
Advertisement