git

Created 2022-10-29 (2010-11-13). Updated 2025-02-09

Cleaning

Dry run:

git clean -dfxn

Actual:

git clean -dfx

Cloning

git clone 192.168.0.14:repos/redact.git # for secure machines
git clone 192.168.0.14:repos/bstrap.git
git clone git@gitlab.com:mcturra2000/cerbo.git
git clone git@gitlab.com:mcturra2000/gemtext.git
git clone git@gitlab.com:mcturra2000/rpi.git

Fetching vs Pulling

git pull = git fetch + git merge, effectively

Patches

Hack hack hack
git commit
git format-patch -1

<a href="http://stackoverflow.com/questions/2082296/how-do-patches-work-in-git">xlink</a>

Reverting

If you want to undo one or more uncommited files: <code>git checkout FILE1 ...</code>

Tags

Creating tags:

git tag -a v1.4 -m 'version 1.4'

Listing tags

git tag

Pushing tags upstream:

git push --tags

<li>Checking out a tag: <code>git checkout $tagname</code>. When you've finished, go back to whatever branch you were working on before: <code>git checkout master</code>

Unclassified

Logs with filenames:
	git log --stat

<hr><h2>Also on this site</h2>

<li><a href="branches.htm">branches</a> - local and remote

<li><a href="config.htm">config</a> - how to configure git

<li><a href="create.htm">create</a> - including creation of bare repos

<li><a href="github.htm">github</a> - specific comments on github, and a list of alternatives

<li><a href="windows.htm">windows</a> - Win 7 native version