git

git

My notes about performing a “git squash” — squashing many commits in a pull request into a single commit (with git rebase) alvin October 15, 2019 - 2:08pm
Links related to Github pull requests and branching alvin August 11, 2019 - 9:23am

Here is a collection of links related to performing a Github pull request, including a few different versions of that workflow:

Git error: Your local changes to the following files would be overwritten by checkout alvin August 8, 2019 - 8:30am

When you get the Git checkout error, “Your local changes to the following files would be overwritten by checkout,” one likely cause is that files in the master branch are indeed newer than the files in your feature branch.

But another possibility that I just learned about is that you did a git add, but forgot to do a git commit before trying to switch branches. My current wrong/accidental workflow looks like this:

Notes related to handling some comments/conversation on a Github pull request alvin August 4, 2019 - 6:40pm

Here are some brief notes related to handling some comments on a Github pull request. Every other pull request I’ve done has been simply accepted, but I’m currently working through a conversation related to a large pull request. Here are the notes:

git fetch wasn’t showing the comments/changes I just approved on Github, but this set of commands successfully pulled those changes from Github and brought them onto my system:

git branch                      #to list the branches
git checkout my-branch-name     #switch to my branch
git pull origin my-branch-name
How-to: Steps to create a Github pull request alvin July 30, 2019 - 7:13pm

I haven’t worked on many open source projects, so my ability to fork a Github project, pull it down, create a branch, push that branch back, and then submit a pull request are weak, at best.

That being said, I’ve done it a few times lately, so I’m getting better at it. Today was a very smooth process, so I thought I’d make these notes while they’re still fresh in my mind.

Git fetch vs pull alvin August 9, 2017 - 9:46am

The Tower app website has a good description of git fetch vs pull. “You can never fetch often enough” is a helpful phrase.

Fun ‘git’ commands alvin May 30, 2017 - 11:39am

This article titled, Little things I like to do with git, has a fun series of git commands.

A Git tutorial by Mary Rose Cook alvin August 1, 2016 - 5:22pm

While I’m in the Mary Rose Cook neighborhood, she also wrote this excellent Git tutorial.

Git - How to automatically `git rm` all files that have been deleted on disk alvin January 13, 2016 - 8:00pm

This SO tip on how to automatically remove/delete all files from a Git repository that you have already deleted on disk is a real timesaver. Of course it’s a wee bit dangerous (and probably won’t work on Windows), but that’s part of its charm.

git push after git tag problem (everything up-to-date) alvin February 21, 2015 - 2:45pm

If you attempt to do a normal git push origin master after adding a tag, you’ll get an “Everything up-to-date” message from Git. In short, this is because you have to push a tag to the origin just like you push a branch.

In my case I just created a tag named v0.1, so I pushed it like this:

git push origin v0.1

The output from the git push command looks like this: