Git notes: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Change git remote: With or without ssh keys added to your user account.. <pre> git remote set-url origin git@gitlab01.iwillfearnoevil.com:monitoring/nmsui.git or: git remote...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
=== General git commands that are useful === | |||
Change git remote: | Change git remote: | ||
Line 7: | Line 8: | ||
or: | or: | ||
git remote set-url origin https://gitlab01.iwillfearnoevil.com/monitoring/nmsui.git | git remote set-url origin https://gitlab01.iwillfearnoevil.com/monitoring/nmsui.git | ||
</pre> | |||
Sort git branches by last commit | |||
<pre> | |||
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' | |||
</pre> | </pre> | ||
[[Category:Git]] | [[Category:Git]] |
Revision as of 10:26, 30 March 2023
General git commands that are useful
Change git remote:
With or without ssh keys added to your user account..
git remote set-url origin git@gitlab01.iwillfearnoevil.com:monitoring/nmsui.git or: git remote set-url origin https://gitlab01.iwillfearnoevil.com/monitoring/nmsui.git
Sort git branches by last commit
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'