Posts Tagged ‘git’

Software Carpentry

January 3, 2018 Leave a comment

Software Carpentry is a community of volunteer instructors who teach short workshops and develop lessons which empower researchers of all disciplines to learn about and improve the ways in which they create software and collaborate.” (source)

I found them today: . Looks good!

funny git commits

February 19, 2017 Leave a comment

Some funny GitHub commits:

Found here.

What to do if shit happened.

Categories: Uncategorized Tags: , , , ,

git: revert “git add .”

September 7, 2016 Leave a comment

You run “git add .” and you manage to add 100+ files :( How to “unadd” them with one command?


git reset HEAD --

I found it here. Click on it for a detailed explanation.

Categories: bash Tags: ,

How to update a GitHub forked repository?

Categories: Uncategorized Tags: , , ,

using git like svn

March 15, 2016 Leave a comment

I have a Digital Ocean virtual private server (VPS) where I want to run a Python-Flask project of mine. The application works well on localhost, so it’s time to make it public.

However, it’s very likely that I will have to customize it a bit on the server, and thus I would like to get those changes on my localhost too. And vice versa, if I do some changes on localhost, I want to upload the new version to the server too. Copying everything via FTP for instance is out of the question. How to do it then?

Let’s use Git. Bitbucket offers free private repositories, so let’s profit of that :) I want to use that repo similarly to SVN: it’s the central repo, it must contain the latest version.


Let “client A” be the VPS and “client B” my home machine (see the figure). When I modify something on localhost, upload the changes to the central repo, log in to the server and download the latest edition. If I modify something on the server, upload the changes to the central repo, and download them on my localhost. This way the two clients are nicely synchronized.

How to upload?
Upload your local changes to the central repo:

$ git status
$ git add -A .
$ git commit -m "your commit message"
$ git push
$ git status

How to download?
Download changes from the central repo (update your local copy):

#!/usr/bin/env bash


git fetch
git pull
git status

But… it’s SVN like this!
Works for me :)

Renaming your Heroku app.

November 1, 2013 Leave a comment

You create a Heroku app. but it gets by default a funny name like How to give it a normal name?

On the Heroku site, navigate to your Dashboard and choose Settings next to your app. There you can give a new name to your app. It will be activated immediately and you won’t be able to reach your app. with the old name.

When trying to push a new version with git, you will get an error. Git is trying to use the old name of your app. Edit the file .git/config and update the url by hand.

Categories: Uncategorized Tags: , ,

Git for Windows

January 9, 2013 Leave a comment
Categories: windows Tags: ,