-3

Hello all,

As you can see from this screenshot, I was in the test branch by mistake and the folder shajhanshi is happened to be my main directory.

Which command I should use to exit from that? I tried few commands but none of them worked. I'm a newbie in using git commands. Thank you.

1
  • Cannot open the screenshot unfortunately. Commented Jan 15, 2018 at 20:57

1 Answer 1

1

That depends on which branch you want to be on for further development.

If you want to be on the master branch you would go back to that with the command: git checkout master

Sign up to request clarification or add additional context in comments.

9 Comments

if any other branch replace master with the name of the branch you do want to be on
I don't want to be on any branch Ben. I just want to come out from the #test branch. I want to see my terminal without any branch. I accidentally checked out in test branch. Thank you for your reply.
With git you have to be on a branch of some kind. The branch that repositories get set up with by default is called "master". The only way to 'come out' from the "test" branch is to switch to a different one.
Your terminal is showing your current branch because of how your prompt is set up. When you change your working directory to one that does not contain a git repository, the text 'test' should disappear. Alternatively you could change your $PS1 to something else.
ya @Ben, I got that. Thank you but it doesn't solve my issue. Let me put it in another way. I would like to see my terminal as shajhansi ~ but not as shajhansi (test #) ~ if that makes sense.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.