How can I move 2 of my commits to a new branch?

my git log is like this: commit 7cfdafdad623d2529f9c2069549619d117f4f43ec commit afdafdafd0165af0651c1c4670bc2cd53738c2433 commit 1235cebdd758c1314ca0002a2c11f9693f43deafb … How can I move the most recent 2 commits to a new branch? (Note: most recent are at the top) I am thinking git branch newbranch git reset –soft HEAD~1 git checkout newbranch git commit -a git checkout master git reset –soft […]

Why can I clone from one machine, but not from another?

I have my own gitlab setup on my own domain. I have been using it happily from my windows desktop, using gitbash. I have been creating repos via the Gitlab web front end then pushing my codebase from my local machine like so; git remote add origin gitlab_user@my.gitlab.domain:my_namespace/my_repo.git I can also clone, like this; git […]

Github deploy only specific features in development branch

So I am figuring out the simplest branching/deployment strategy from Github that at least has a dev and a release(master) branch. After seing this answer I think this is really close to what we need. Except the one big problem of being able to deploy only some features. Not everything. The 2 options presented here […]

Git mergetool on Windows keeps being given filepath from Git install rather than repository root

I want to use SemanticMerge as my mergetool in Git, but when I try to perform a merge, I get a complaint from SemanticMerge saying that it cannot locate the file C:\Program Files (x86)\Git\my_repo_name\my_project\MyFile.cs.BASE.1234.cs – which is absolutely correct as it should be at C:\repositories\my_repo_name\my_project\MyFile.cs and so on. For some reason although Git is working […]

How could commits be on a branch twice?

I have the following Git history: D-E-A-B-C-A-B-C (feature2) / *-D-E (feature1) / *-F (develop) I have no idea how A, B and C ended up on feature2 twice. I have been rebasing feature2 on and off of feature1 using git rebase feature1 and git rebase –onto develop feature1. I’ve rectified the situation by cherry-picking A, […]

Vi Error while making git commit

I am attempting to make a git commit. I run the command git commit and vim opens up. I type in my commit message, and when I execute the :wq command, I get the following error: error: There was a problem with the editor ‘vi’. Please supply the message using either -m or -F option. […]

gitpython creating zip archive

How can I create an archive with gitpython, I tried the following which creates the file but I can’t open it it tells me an error occurred reading archive the archive appears to be invalid or damaged from git import * repo = Repo(repo_path) assert repo.bare == False repo.archive(open(“repo.tar”,’w’)) I would like to create a […]

Where does my commit goes if I checkout tag and commit?

In GIT, if I checkout a tag I’ll get my working copy to that tag’s reference, i.e. the code will represent what I had at that time. I’m I correct? Now, if I do that, and modify my code and commit. Where is that commit going? Will it sort of ‘auto-merge’? Meaning that if I […]

What is the advantage of committing to the Git object database?

In the discussion amongst the comments in this libgit2sharp issue it was highlighted I can create commits against the object database? What is committing to the object database? Why is advantageous over doing a normal git add and git commit? I’m trying to import commit history from another source control system, SourceGear, into Git. At […]

Smart Git not showing local changes

Any ideas on how come none of the local changes are being shown on smart git 7.0.4. This is happening on all the branches and was perfectly working a couple of hours before.

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