Git Notes:

Merve
1 min readMar 7, 2023

It is not a full tutorial :P Sometimes, I take notes myself. I hope you can find a useful thing for yourself.

git log -p -2   #show the difference
git log --stat #show the how many changes they have
git tag #list all tags -> tag just a special name of commits.
git checkout -b <new-branch> #creating a new branch
git checkout #changes the branch
git push -u origin usenix2023fall #pushing local branch to remote (orijin)
git submodule add <remote_url> <destination_folder> #submodule add
git branch --delete #delete branches
git reset HEAD <file>... #to unstage
git remote set-url origin #to change the remote url
git config --get remote.origin.url #to print the url address
git status . #current subfolder status
git diff starting-commit-sha ending-commit-sha myPatch. patch #how to create patch

How to use git-latex diff. It produces a pdf file shows which sentences are edited/added.

git clone https://gitlab.com/git-latexdiff/git-latexdiff.git ¨
cd git-latexdiff
make install-bin // without documentation
sudo apt install latexdiff
// go to the your folder
git latexdiff ex-version new-version -main main.tex

Resources

Git — Book (git-scm.com)

--

--