If you accidentally merged a feature branch into develop you can use git-revert to undo the merge. But when the time has come to merge the feature branch into develop, git-merge command sees the original merge, and happily announces that all is well and branches have been already merged. To revert the revert without screwing
Continue reading Revert a faulty merged branch
Category: Git – SVN
Make Git ignore file mode (chmod) changes
Go to the root of the directory with the git clone ans type:\ git config core.fileMode false // –global flag will make it be the default behavior for the logged in user git config –global core.fileMode false // Remove your local configuration to make the global configuration take effect git config –unset core.fileModegit
Continue reading Make Git ignore file mode (chmod) changes
Keep Git Fork up-to-date
Keeping Your Fork Up to Date While this isn’t an absolutely necessary step, if you plan on doing anything more than just a tiny quick fix, you’ll want to make sure you keep your fork up to date by tracking the original “upstream” repo that you forked. To do this, you’ll need to add a
Continue reading Keep Git Fork up-to-date
Git clone into non-empty directory
If you want to clone a git repository into a non-empty directory you will get an error: fatal: destination path ‘.’ already exists and is not an empty directory. You can fix this: git init git remote add origin PATH/TO/REPO git fetch git checkout -t origin/master If you get the following error: fatal: Cannot
Continue reading Git clone into non-empty directory
Git pull: fatal: Couldn’t find remote ref refs/heads
Start by looking at .git/config file in you’re project folder for references to that branch, and removing them. Another way is to prune all stale branches from your local repository. This will delete all local branches that already have been removed from the remote: git remote prune origin –dry-run // If it looks correct git
Continue reading Git pull: fatal: Couldn’t find remote ref refs/heads