git
How to have git-svn take care of empty directories gracefully?
Use rmdir argument or config parameter: –rmdir Only used with the dcommit, set-tree and commit-diff commands. Remove directories from the SVN tree if there are no files left behind. SVN can version empty directories, and they are not removed by default if there are no files left in them. git cannot version empty directories. Enabling … Read more
Limiting file size in git repository
As I was struggling with it for a while, even with the description, and I think this is relevant for others too, I thought I’d post an implementation of how what J16 SDiZ described could be implemented. So, my take on the server-side update hook preventing too big files to be pushed: #!/bin/bash # Script … Read more
How many public repositories can be made on GitHub for individual account?
THe “What plan should I choose?” page mentions: GitHub provides two types of plans: free plans and paid plans. Both plans have the exact same features. They can have any number of public repositories, with unlimited collaborators. That being said, too much of anything will be eventually detected and reviewed by GitHub in order to … Read more
git bisect says Bisecting: a merge base must be tested
This will happen if the given good and bad revision are not direct descendants of each other. Let’s assume a repository like this (using exemplary names for the commits): * dffa2 good-commit * b38f4 a2 * cc19f a1 | * d1f17 bad-commit | * fbd1f b2 | * f66cc b1 |/ * 09f66 merge-base-commit What … Read more
Merge conflict in .gitignore
You edited the .gitignore in both branches. Now, git is unsure of which lines in each copy are the correct ones so it is asking you to resolve them. The lines: <<<<<<< HEAD public/img/ignore ======= Are what appears in the copy of the file in master. And ======= public/img/profiles public/blog public/recommendation >>>>>>> newfeature in the … Read more
How to remove a file from being tracked by git? [duplicate]
remove the file from tracking: git rm –cached config-dev.php && git commit -m “config-dev.php” add it to the .gitignore echo config-dev.php >> .gitignore git add .gitignore git commit -m “adding config-dev.php to .gitignore” Publish these changes git push On your colleagues machine fetch the new configuration git pull Done When your other dev gets errors … Read more
Convert Bitbucket Mercurial repository to Git. Maintain branches and history. Online solution
The only way I found to convert a Mercurial repo to Git, while keeping all the branches, was to use GitHub’s importer. This was also the easiest since it’s all done online. Nothing local to install, no command line stuff. Main idea Use Github’s importer to convert Bitbucket Mercurial repo to GitHub Git repo. Then … Read more
Create a GitHub repository from command line
You need to create the repo before pushing, but there’s hub that automates this for you: git init newRepo cd newRepo hub create Use the -p switch to hub create to create a private repository. To push the local master branch, issue: git push -u origin HEAD The tool can also create pull requests, open … Read more
Deploy two separate heroku apps from same git repo
The solution suggested by rdegges unfortunately does not work anymore. See: The web process type is special as it’s the only process type that will receive HTTP traffic from Heroku’s routers. Other process types can be named arbitrarily. from the Heroku documentation. So you won’t be able to have api and web in a Procfile … Read more