Skip to content

Migrate all branches and tags to bitbucket/github/gitlab/other remote endpoint

To have a real world scenario think about the task to migrate from an existing private gitweb repository to bitbucket, with all tags and branches.

The solution simple und just needs some time if the repository is a bigger one.

First, you have to create an empty and new repository at bitbucket.

cd <path you want to do this action>
#the next step is just for safety reasons
mkdir <repository_name>
git clone --mirror git@<your host>:<repository_name>.git .
git push --mirror<user_name>/<repository_name>

See how easy it is? Why not write a simple bash script?

# @link
# @since 2017-11-06
# @author stev leibelt <>

if [[ $# -lt 2 ]];
    echo ":: Invalid arguments provided."
    echo "   <command> \"<source repository url>\" \"<destination repository url>\""

    exit 1;


echo ":: Creating temporary directory."


echo ":: Cloning from source repository.".
git clone --mirror "${SOURCE_REPOSITORY_PATH}" .

echo ":: Pushing to destination repository."
git push --mirror "${DESTINATION_REPOSITORY_PATH}"

echo ":: You have to remove the following temporary directory if you want to."
echo "   "$(pwd)
Translate to de es fr it pt ja

web - server and client side remote code execution through a buffer overflow in all git versions before 2.7.1 (unpublished ᴄᴠᴇ-2016-2324 and ᴄᴠᴇ‑2016‑2315)

Someone has released an exploit to execute remote code on each machine (client or server) running git before version 2.7.1.
If you are working under "arch linux", you are pretty save with an "pacman -Syyu"
. I recommend reading the blog post called Remote Code Execution in all git versions (client + server) < 2.7.1: CVE-2016-2324, CVE-2016‑2315. But before reading, update your systems.

Translate to de es fr it pt ja

Meld, my favorite git mergetool

So, I was searching for a git merge tool.
I know, cool kids are using vimdiff and I use it too. But right now, the force is not strong enough for using this four window layout. Because of that, I was searching for an easy to use, free as in freedom, merge tool.
After asking a lot of questions to my favorite search engine, I found meld, or to be precise, the gitguys found it.
Currently, I am really happy with it. But for sure, I will keep on learning the force to master vimdiff in the future.

Translate to de es fr it pt ja

gosh, why is my vendor directory consuming so much diskspace?

"Saving disk space on your composer projects" was a headline for an older entry I made.
I used this project and figured out it has a lot of bugs because of its "outdateness". Thats why I spend some time to create a build script, build a new "compify.phar" and created a pull request to it. Sadly, no response or action has been done by carlos (also no response on any e-mail).
I did the pull request on 28.07.2015, meaning a lot of water is gone down the river since then.
After waiting and waiting, I gave up and simple added my created "compify.phar" in a project called php project maintenance. As given by the name, this project has to goal to easy up maintenance for php projects ;-).
The, currently, best script inside is updateallrepositories which simple tries to find all git repositories from your current working directory. Inside each directory, it is doing some git stuff and also - since today - using compify to clean up the vendor diskspace. If you want to automate that kind of process, feel free to use it and pull some requests if there is something that can be optimized.

Translate to de es fr it pt ja