Navigation Menu

Skip to content

git diff --name-only and spaces #21723

Answered by Wabri
eshlomi1 asked this question in New to GitHub
Discussion options

You must be logged in to vote

Hi @eshlomi1,

Welcome to the Github Community Forum!

This is a little triky, but i think we can get on it…

From now on i will call B the commit that you have create last and A the previous commit, and also consider to start from the master branch.

With a git log you can see the id of the commit , something like this:

commit **cb2fa6226febb3f3b6be53b15bba4c83adeaff9f \<-------- This is the id** Author: User name <usermail@mail.com>
Date: Thu Feb 14 16:04:07 2019 +0100
update

Now create a branch from A with the git command

git checkout -b <name_of_branch> <commit_id>

In my case i will use this:

git checkout -b test.one **cb2fa6226febb3f3b6be53b15bba4c83adeaff9f**

(You can also use the H…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants