Tag: git

Can't run peridot test suite from a git hook

I have made the following pre-commit git hook: #/usr/bin/env bash echo “Running pre-commit hooks… ” vendor/bin/peridot -c OS/Specs/peridot.php OS/Specs/ echo “Done.” When I simply enter this command into terminal, it runs all my tests. However, when the git hook is triggered, I get this: Running pre-commit hooks… PHP Parse error: parse error in /path/to/repo/vendor/peridot-php/peridot/bin/peridot on […]

Any Way I Can Easily Merge Git Branches Created in CVS2Git Migration?

We recently did a migration of our CVS repository to Git. In our CVS repository, we had some branches with code in them that we had stashed away after development was complete, until we had time to schedule them at a later point. When we did the migration using CVS2Git, it resulted in the branches […]

Share remotes with development team

Is there anyway to share the remotes I have setup in a git repo when the repo is cloned by others. I can think of two instances where this would be helpful. If you use git subtrees, anyone wanting to update the subtree folder will need to know what remote you were using. If you […]

git branch -r not showing all remote branches

I don’t see all my remote branches with command git branch -r origin/HEAD -> origin/master origin/master But then I use git ls-remote origin the output is e7ae5a2136ac27528cb201040f432faf29034d67 HEAD a085ebd1c7f0477cee4bbad92810e057f5899b6b refs/heads/bundles c9b34c60a18278e02489a2f232604f8e1bd295ca refs/heads/bundles_new 8eca519636f2dfe8a6b5d7f8e8021c5fc2a72fd7 refs/heads/compression So I’m trying to fetch all these branches git fetch origin remote: Counting objects: 22417, done. remote: Compressing objects: 100% (8478/8478), […]

Heroku thinks everything is up to date when it is not

I recently did: git push -f heroku master Now when I try to push new changes to heroku, it says “Everything is up to date”. Maybe forcing the last git push doesn’t have anything to do with the problem, but I’m new to Heroku and Git and I’m completely lost. Also, I am working on […]

Advanced Git branch juggling

I have a curious situation which I can resolve in other methods but I wanted to push my knowledge of git a little further. I think a diagram is in order. It looks crazy but I think it’s not actually that bad. I used square brackets to indicate the current branches. upstream / \ / […]

Dealing with added and deleted files in a git merge

In my repository I have two branches: master and dev. There has been a lot of activity on the dev branch and I need to merge it back into master, but I’m having trouble finding the right way to do it. If I do a straightforward git merge dev then it creates conflicts in files […]

Undoing an old commit

Is possible I undo some old commit? For instance: 23-03-2015: Last Commit 22-03-2015: Previous Commit … 12-03-2015: Changed Login method 11-03-2015: My old Login method I’m working over my Last Commit, and on Changed Login method I replaced my login method to another one, but for any reason, I need back to my old method, […]

Trying to do a git checkout from a PHP script

I made a small php webhook that executes git command to checkout the code from a remote repository in a detached worktree. I got this: error: cannot open .git/FETCH_HEAD: Permission denied I then changed the ownership of the .git directory to www-data to ensure that it gets written by the PHP script. I did this […]

Why does git remote hang up when pushing lots of tags?

I was playing around with Git to see if an idea I had would be feasible (essentially tracking version numbers for many files with prefixed tags). I setup a script to generate lots of files and version tags which left me with approximately 45000 tags. We are using Atlassian Stash for our Git server, so […]

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