Skip to content

Latest commit

 

History

History
94 lines (63 loc) · 1.51 KB

File metadata and controls

94 lines (63 loc) · 1.51 KB

Hello Git

.gitconfig

Create a symlink from this tracked file to the location Git reads:

ln -sf .gitconfig ~/.gitconfig

Create ~/.gitconfig.local that looks like this:

[user]
    email = someaddress@example.com

Validate:

echo "Email: $(git config user.email)" && echo "Name: $(git config user.name)"

should give:

Email: someaddress@example.com
Name: Mark Wiemer

Temporarily ignore some files

How to ignore new changes to a tracked file with git

git update-index --assume-unchanged <filename>
git update-index --no-assume-unchanged <filename>

Git LFS

For tracking images and other binary/non-text files, see Git LFS.

This command prints objects to commit and should include (LFS) to reference the files Git LFS is tracking vs (Git) for files that Git (core) is tracking but Git LFS is not tracking.

git lfs status

Submodules

After first clone of repo:

git submodule update --init --recursive

Update all to match current remote:

git submodule update --remote

To add a new submodule:

git submodule add url relative_path

To remove a submodule:

git rm path_to_submodule

To rename a submodule, simply delete it and re-add it in a renamed folder.

Tags

git tag tagname
git push --tags
git tag -d tagname
git push --delete remote tagname