Moving a file to different folder along with history in git

First of all, I had a look at this question which is exactly the same what I am addressing here. But the problem is the solution given in the question, does not work for me. The solution given is this: git filter-branch –tree-filter “cd x; mkdir -p p/q; mv [files & sub-dirs] p/q” HEAD to […]

Failed to deploy app to heroku

I´m following this tutorial http://installfest.railsbridge.org/installfest/deploy_a_rails_app and i always fail since Step 2.2: Prepare your rails app for deploying to Heroku, i made all changes to Gemfile: Inside this file, change the line: gem ‘sqlite3’ To this: group :development, :test do gem ‘sqlite3’ end group :production do gem ‘pg’ gem ‘rails_12factor’ end Save the file. After […]

How to use docker for deployment and development?

Suppose I have a python web app. I can create docker file for installing all dependencies. But then (or before it if I have requirements for pip) I have like two different goals. For deployment I can just download all source code from git through ssh or tarballs and it would work. But for a […]

Git: pull from master to topic branch before merging into master?

Assume I have a topic branch fix-bug-#25 that has diverged from master a couple of commits ago: o–o–o master \ o–o–o bug-fix-#25 On my third commit in bug-fix-#25 I fixed the bug and want to merge the branch into master. Should I checkout master first, merge the topic branch into master git checkout master git […]

git ls-remote hangs when using GIT_SSH

Recently I’ve started seeing a lot of timeouts when deploying to one of my EC2 servers. After some investigating I narrowed the problem down to git ls-remote and GIT_SSH script. This works 100% of the time: eval `ssh-agent -s` && ssh-add key.pem && git ls-remote -h git@github.com:repo This hangs 90% of the time: GIT_SSH=wrapper.sh git […]

Is there an easy way to get a git reverse log starting from a given commit?

Say I have a simple history: A -> B -> C -> D -> E -> F -> G When normally doing e.g. git log D, I get the history D C B … Is it possible to get the view in the other direction D E F … i.e. like what git log –reverse […]

Report of bitbucket and github pull and push

I need a report of all pull and push by all team members.

How to create a secure git repository in the cloud?

I would like to create a git repository and keep a backup copy of it in the cloud. Creating a remote repository would be a simple solution, but the code would be open to anyone with access to the cloud machine, thus compromised. Currently I manage this git repository in the local computer (it is […]

Deleted a Git Branch and it changed my HEAD, How do I change it back?

I’m not entirely sure of my process here, not too sure what I did or how it happened. But we’ve locally deleted the master branch on accident. And now the HEAD of the project has changed to a different branch. I’ve tried to run the command-line of: git remote set-head origin master But this isn’t […]

Rebase is making push impossible

I’m having some trouble with Git using rebase, here is a “draw” of what the situation was, what I want and what I did. Repo state (initial) — C1 — C5 — C6 — C7 (master & origin/master) \ \— C2 — C3 — C4 (my-branch & origin/my-branch) Repo state (wanted) — C1 — C5 […]

Git Baby is a git and github fan, let's start git clone.