You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on Windows: “Checkout Windows-style, commit Unix-style”
Git will convert LF to CRLF when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Windows
$ git config --global core.autocrlf true
on Unix: “Checkout as-is, commit Unix-style”
Git will not perform any conversion when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects this is the recommended setting on Unix
$ git config --global core.autocrlf input
$ git status -u|--untracked-files # alle files, nicht nur Ordner
$ git status --ignore # zeige ignorierte Dateien
PUSH TO NON-BARE REPOSITORY
$ git init server && cd server
$ touch a && git add . && git commit -m 0
$ git config --local receive.denyCurrentBranch updateInstead
$ cd .. && git clone server local && cd local
$ touch b && git add . && git commit -m 1
$ git push origin master:master
$ cd ../server && ls
➜ a b
$ git checkout a (you will switch to branch a)
$ git merge b (this will merge all changes from branch b into a)
$ git commit -a (this will commit your changes)
CHERRY-PICK
$ git cherry-pick <sha>
REBASE
(in den aufnehmenden branch wechseln)
$ git checkout master
$ git rebase <abgebender branch>
--oder--
$ git rebase <sourcebranch> <targetbranch>
TAGS
TAG LÖSCHEN
$ git tag -d <tag-name>
$ git push origin :refs/tags/<tag-name>
TAG ANLEGEN
$ git tag -a <tag-name> -m "<beschreibung>" (kommentierter tag)
-- oder --
$ git tag <tag-name> (einfacher tag)
NACHTRÄGLICH TAGGEN
$ git tag -a <tag-name> -m '<beschreibung>' <sha>
TAG ANZEIGEN
$ git tag
$ git show <tag-name>
TAGS VERÖFFENTLICHEN
$ git push origin <tag-name>
-- oder alle tags --
$ git push origin --tags
REMOTES
REMOTE INFO
$ git remote -vv
PUSH TO MULTIPLE REMOTES
$ git remote add ALL <url1>
$ git remote set-url --add --push ALL <url1>
$ git remote set-url --add --push ALL <url2>
$ git push ALL <branchname>
$ git checkout b # source name
$ git merge [-s ours | -X --theirs ] a # target name
$ git checkout a # target name
$ git merge b # source name
[ourstheirs](https://nitaym.github.io/ourstheirs/)
$ git update-index --skip-worktree <file>
That will ignore changes to that file, both local and upstream, until you decide to allow them again with:
$ git update-index --no-skip-worktree <file>
get a list of files that are marked skipped with:
$ git ls-files -v . | grep ^S