<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Git :: Dimitar's CBA Blog</title><link>https://pub.cba.mit.edu/dimitar.dimitrov/blog/tools/git/index.html</link><description>TL;DR git clone &lt;url&gt; git add . git commit -m "make changes" git pull git push Introduction Git is truly fantastic software, and potentially my all-time favorite tool. It simultaneously solves two problems: version control and collaboration. I use it for all kinds of things. As a rule of thumb, every time I create a file that I may some day want to edit, I make sure it’s under Git control, even if it’s entirely local. (Even my /etc is under Git control! I use a tool called etckeeper to automatically create commits before and after updates and to keep track of permissions.) I’m writing this little post partly as a quick-start guide, and partly as a means to convince the reader they ought to use Git everywhere too, even if they’re not a software developer (I’m not).</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://pub.cba.mit.edu/dimitar.dimitrov/blog/tools/git/index.xml" rel="self" type="application/rss+xml"/><item><title>Installing Git</title><link>https://pub.cba.mit.edu/dimitar.dimitrov/blog/tools/git/installing/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pub.cba.mit.edu/dimitar.dimitrov/blog/tools/git/installing/index.html</guid><description>Nothing is needed to possess a Git repo (it’s just a folder with a hidden .git subfolder). To interact with it, though, you need the git program. This page describes how to obtain this program.
The official installation instructions can be found here: https://git-scm.com/install. The info below is my version of the above. See the section that corresponds to your operating system.
Windows There are a few ways to use the Git program in Windows. Below, I describe two. Pick whichever one feels better to you.</description></item><item><title>Removing a Big File</title><link>https://pub.cba.mit.edu/dimitar.dimitrov/blog/tools/git/remove_big_file/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pub.cba.mit.edu/dimitar.dimitrov/blog/tools/git/remove_big_file/index.html</guid><description>If you accidentally commit a big file:
git reset HEAD~1 And that’s it!
What if it wasn’t the last commit Run rebase -i --root. This will open a file. Find the bad commit and replace the word pick with the word edit (or just the letter e). Save and quit the file. Fix your mistake (e.g. compress the file). Run git add &lt;the file&gt;. Run git rebase --continue.
What if you want to save space locally If you want to remove the object from your local .git to save space:</description></item></channel></rss>