Tag: commit

Will a commit be garbage collected if it's referred to by tag but not by branch?

I’ve got an annotated tag referring to a commit (does it matter if it is annotated?) and no branch referring there. Will the commit be garbage collected after some time?

Git push vs. git push heroku master

I just moved from a pc laptop to a Mac, and I’ve noticed a curious difference in how my git commands respond. Before, I would do the following: git add . git commit -m “These are my new changes” git push # This would update my repo on github {enter password} git push heroku master […]

Close Jira issue via Git commit

Does anyone know if it’s possible to change the status of a Jira issue using a Git commit? I am using Jira and Git with the Jira Git plugin and I know I can reference an issue by just adding the name in the commit but I thought a commit message like “ISSUE-1 #close” would […]

Copy 1 commit from one branch (dev) to another (stable) with clean working dir

I tried to understand How to undo a commit and commit the changes into the other branch in Git? but I don’t think it has to be that hard. (Answer is using branch -f and stash and I don’t think I need those.) I was working in my dev branch. Had two different commits in […]

Why does git call me “clever” when I reword the last commit message?

I regularly run git commit –only –amend to reword the commit message of the latest commit I made. This will work irrespective of whether my working directory is clean or not. Today I noticed that when doing this, the default instructions for writing commit messages shown in my core.editor include the following comment: # Clever… […]

cherry-pick a commit and keep original SHA code

I would like to cherry-pick a commit on a fetched remote while keeping it’s original SHA commit code (my current branch is based on this remote which I resetted to a previous state).

git: change one line in file for the complete history

When I started my git repo I commited a few files as initial commit to it. Now, many commits later, I noticed that I included in those files a line with information which I do not want to publish (unlike the rest of the code). So I want to remove/change this one line and keep […]

How to git ignore ipython notebook checkpoints anywhere in repository

This is mostly a git question. I want to commit my ipython notebooks but gitignore the checkpoints. The repo has multiple folders which each have ipython notebooks, therefore just ignoring a single directory does not solve it. I want to keep adding new folders with notebooks inside without worrying about it. My hunch is that […]

File not shown in git diff after a git add. How do I know it will be committed?

I had an untracked file which was not appearing in a git diff and when I added it to the ‘changes to be committed’ area, it still doesn’t show up in the git diff. I shows up with a git status -v when I do a diff against HEAD. I’m still very new to git, […]

Do you push every single commit?

I would like, if someone could give me more detail in working with git and remote repositories. I haven’t worked with remote repositories, yet. To the local repository you commit smaller changes that may not be too world-shattering. What is pushed to the remote repository? Every local commit? Or the overall-work that was done, which […]

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