Here is a collection of links related to performing a Github pull request, including a few different versions of that workflow:
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:
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
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.
I’ve used Jenkins before, but hadn’t used it in a while, so when I got it running with Scala, SBT, ScalaTest, and Git, I made some notes about how to configure it. You can get Jenkins going with Docker, but I just got Jenkins running by starting its WAR file like this:
java -jar jenkins.war
Jenkins with Scala, SBT, ScalaTest, and Git
My notes on getting everything up and running are a little cryptic, but if you have a little experience with Jenkins I hope they’ll make sense. Here they are:
As a brief note to self, these were the two best Jenkins tutorials I found in early 2019:
The first one shows how to run Jenkins with Docker, and the second one shows how to build a Java/Maven/Git project.
This tutorial on how to use Jenkins with Scala and SBT was also helpful:
The Tower app website has a good description of git fetch vs pull. “You can never fetch often enough” is a helpful phrase.
This article titled, Little things I like to do with git, has a fun series of git commands.
While I’m in the Mary Rose Cook neighborhood, she also wrote this excellent Git tutorial.
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.