Tag: commit

Git Ignore not working, I don't get it

I thought I had figured this out but on recent attempts it is failing. I need to commit a file, then after the commit ignore it on any subsequent repo commits. Lets say the file is example.txt. I commit changes to example.txt and push them to github. I then touch .gitignore and add example.txt to […]

How is the git name determined when committing and pushing

I committed in git and pushed, during push git is asking my user and password. Now, on github, my computer account user name is showing up. Why? Specifically, git config –system -l returns “file not found”. git config –global -l has no user entry. git config –local -l has no user entry. Why is the […]

Creating Git alias that gets the last commit

I’m wondering if there is any way to get the SHA1 of the last commit via a Git alias. I have the following so far, but it throws an error saying: Expansion of alias ‘last-commit’ failed; ‘9fa5c2c72e586ce825d54114532400d8cc56106f’ is not a git command The command I’m using to create the last-commit alias: git config –global alias.last-commit […]

Accept default git commit message after a squashed merge

I would like to do the following in a script: git merge –squash someBranch git push The problem is that the merge does not do a commit. So before the push I have to commit. The default commit message created by this merge is sufficient. So my questions are: Can I do the merge with […]

How do I visualise my git repo properly?

I’m currently making commits and using branches in my remote Git repo. But, whenever I use: git log –graph –pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset’ –abbrev-commit –date=relative It just shows my commit history in a single line – no branches, despite branches being named ‘origin/API’, ‘origin/dev’ and ‘origin/master’. If you have a look at Showing […]

GitHub Source view shows commit that does no longer exist

I rewrote the history of a GitHub repository two weeks ago (rebase and some cherry-picks) and force pushed it back to GitHub via git push -f origin master Everything went fine, at least it looked that way and git log showed the correct commit history. I know, rewriting history is bad practice, but the repository […]

GIT: is a tag unique per commit?

If you can use a tag only once (unique by commit), what do I do with 7 commits in tag “Version 7.3“? I hate that GIT doesn’t make revision numbers (like SVN :)). I guess a subquestion would be: What would be a best practice to ‘control’ version numbers (ex revisions, so I want to […]

Git won't let me rebase (untracked files would be overwritten). What should I do?

I just want to edit/amend the text of an older Git commit. I ran the following: $ git rebase -i a41a407d6f53328d49267e6a8429b9492f023629 error: The following untracked working tree files would be overwritten by checkout: admin/roles/allowassign.php admin/roles/allowoverride.php admin/roles/assign.html admin/roles/assign.php admin/roles/manage.html admin/roles/manage.php admin/roles/managetabs.php admin/roles/override.html admin/roles/override.php Aborting could not detach HEAD However, git status does not list any untracked […]

Git Commits appear in Bitbucket but not in SourceTree

I’ve recently been trying to merge in some changes from a number of branches, when I discovered that the changes I made have completely disappeared. We use Bitbucket for our source code hosting, and use Git through SourceTree. When I view the specific commit in the Bitbucket UI, I can clearly see that files have […]

Can't commit my project with git

I’m using the eclipse plugin for git in order to commit my PHP projects. Until now everything goes fine but suddenly when I commit i get the following error: Committing failed An internal error occurred Entry not found by path: //ms_system/…/file.php I notice that some of the files in the commit list has an invalid […]

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