Skip to content

Instantly share code, notes, and snippets.

@01-Scripts
Last active September 24, 2015 15:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 01-Scripts/772736 to your computer and use it in GitHub Desktop.
Save 01-Scripts/772736 to your computer and use it in GitHub Desktop.
Working with git and github, ssh, console & co.
Abort a (conflicted) merge:
git merge --abort
Console:
ssh-keygen -l -f server-public-key.txt
server-public-key.txt is placed in C:\Users\Username\
Git-Bash:
git push REMOTENAME :BRANCHNAME
REMOTENAME in der Form git@gist.github.com:772736.git
http://help.github.com/remotes/
Since a recent version of TortoiseGIT it is possible to delete remote branches directly from the log view of TortoiseGIT
You probably won't need to do this often (if ever at all) but just in case, here is how to delete a tag from a remote Git repository.
If you have a tag named '12345' then you would just do this:
git tag -d 12345
git push origin :refs/tags/12345
That will remove '12345' from the remote repository.
http://nathanhoad.net/how-to-delete-a-remote-git-tag
Once the clone is complete your repo will have a remote named “origin” that points to your fork on github. Don’t let the name confuse you, this does not point to the original repo you forked from. To help you keep track of that repo we will add another remote named “upstream”:
$ git remote add upstream git://github.com/pjhyett/github-services.git
Or with tortoisegit:
-->Repository-Settings->Git->Remote->New
http://help.github.com/forking/
-> Rechtsklick Arbeitsplatz bzw. Computer
-> Eigenschaften
-> Erweiterte Systemeinstellungen
-> Umgebungsvariablen
-> Der Variable Path den Pfad zu C:\Programme\...\Git\bin hinzufügen
Danach die Konsole neustarten und der git Befehl ist global verfügbar.
@01-Scripts
Copy link
Author

Git Bash im entsprechenden Repo öffnen via Rechtsklick -> Git Bash here...

@01-Scripts
Copy link
Author

Alle Konsolenbefehle immer über die git Bash und NICHT über die cmd-Konsole von Windows ausführen!
Es wird sonst ein anderer SSH-Client verwendet, der die nötige Passphrase nicht abfragt und deshalb keine Verbindung zu Github ermöglicht!
siehe: http://stackoverflow.com/a/9408678

@01-Scripts
Copy link
Author

Copy Paste in git bash via [INSERT]-Taste
see: http://stackoverflow.com/a/2304382

@01-Scripts
Copy link
Author

$ als Zeichen eines Pfads mit vorangestelltem Backslash schützen:
cd $...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment