Part 2: Git or How I learned to stop worrying and love the troubleshooting

More on some of the troubleshooting I’ve had to handle:

4. Adding a ‘.gitignore’ file after the ignored files are already in the repo (aka adding ‘.gitignore’ file to remove files to be ignored in the repo)

Several times I’ve uploaded ‘.bundle’ and ‘vendor’ folders after running bundler and subsequently pushing that into the repo. Oops. It’s stupid because you are adding files that can be installed from the user, so why make your repo bloated?

After pushing your ‘.gitignore’ file to the repo containing line-by-line the files and folders you want to ignore, run the complicated looking command below…

git rm --cached `git ls-files -i --exclude-from=.gitignore`

… then ‘git add .’ those changes, ‘git commit -m ‘removing .gitignore files/folders”, then ‘git push’ the new changes.

5. Use Seth Robertson’s website for more Git troubleshooting

Seth has made a pretty thorough, no-frills choose-your-own-adventure styled troubleshooting guide. I want to make an even simpler one eventually but his is great. Use it if Git help is just too complicated:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s