Karteikarten
Git Commands
Karten in diesem Stapel (35)
- 1set a name that is identifiable for credit when review version historygit config --global user.name “[firstname lastname]”
- 2set an email address that will be associated with each history markergit config --global user.email “[valid-email]”
- 3set automatic command line coloring for Git for easy reviewinggit config --global color.ui auto
- 4initialize an existing directory as a Git repositorygit init
- 5retrieve an entire repository from a hosted location via URLgit clone [url]
- 6show modified files in working directory, staged for your next commitgit status
- 7add a file as it looks now to your next commit (stage)git add [file]
- 8unstage a file while retaining the changes in working directorygit reset [file]
- 9diff of what is changed but not stagedgit diff
- 10diff of what is staged but not yet commitedgit diff --staged
- 11commit your staged content as a new commit snapshotgit commit -m “[message]”
- 12list your branches. a * will appear next to the currently active branchgit branch
- 13create a new branch at the current commitgit branch [branch-name]
- 14switch to another branch and check it out into your working directorygit checkout [branch]
- 15merge the specified branch’s history into the current onegit merge [branch]
- 16show all commits in the current branch’s historygit log
- 17show the commit history for the currently active branchgit log
- 18show the commits on branchA that are not on branchBgit log branchB..branchA
- 19show any object in Git in human-readable formatgit show [SHA]
- 20delete the file from project and stage the removal for commitgit rm [file]
- 21change an existing file path and stage the movegit mv [existing-path] [new-path]
- 22show all commit logs with indication of any paths that movedgit log --stat -M
- 23Save a file with desired paterns as .gitignore with either direct string matches or wildcard globs.logs/
*.notes
pattern*/ - 24system wide ignore patern for all local repositoriesgit config --global core.excludesfile [file]
- 25add a git URL as an aliasgit remote add [alias] [url]
- 26fetch down all the branches from that Git remotegit fetch [alias]
- 27merge a remote branch into your current branch to bring it up to dategit merge [alias]/[branch]
- 28Transmit local branch commits to the remote repository branchgit push [alias] [branch]
- 29fetch and merge any commits from the tracking remote branchgit pull
- 30apply any commits of current branch ahead of specified onegit rebase [branch]
- 31clear staging area, rewrite working tree from specified commitgit reset --hard [commit]
- 32Save modified and staged changesgit stash
- 33list stack-order of stashed file changesgit stash list
- 34write working from top of stash stackgit stash pop
- 35discard the changes from top of stash stackgit stash drop
Informationen
- Beschreibung
- Information Technology Karteikarten am Git Commands, erstellt von Maarten Van Doninck am 19/12/2024.
- Erstellt von
- Maarten Van Doninck
- Aufrufe
- 0
- Bewertung