My First Git Pull Request

Found a very nice git repository with VisualCrossing sample code. Of course theirs doesn’t compile in my project – so this is my big opportunity – my first attempt at contributing to a project.

Medium has already written up the process very nicely here. But of course I have to do it myself and make my own notes.

I got lost on medium, so now trying this link.

Go to the repo you want to contribute to, and click Fork.

Once forked, this is added to your own repository. Clone the copy in your own repo. Amend as required, and test.

On your local copy, give it the upstream url – that is the one you forked. Note to self, make sure you cd to within your project folder.

git remote add upstream https://github.com/visualcrossing/WeatherApi.git

Use git remote -v to check that this worked.

So make a branch. Update the code. Push to your own repo.

Try git pull now, and end up with this

git fetch upstream
git checkout -b AddAndroidJava upstream/master

Add your code and commit like usual but don’t push yet.

git push origin AddAndroidJava

Now a new message has appeared on the upstream git page.

So I clicked the button and …

The better half very sensibly advised that I add the IDE name and version, as well as the Android version

So that is it. I have submitted my first real Pull Request. Let’s see if anyone comments on it. ☃︎ ☃︎

One thought on “My First Git Pull Request

Leave a Reply

Your email address will not be published. Required fields are marked *