goodcow
goodcow

Reputation: 4795

Git in terminal

I tried making my first repo on github. I copy pasted their code while on the directory of my entire system (I think that was a mistake). As a result, the terminal line always says ~ git:(master) ✗ before every command. It does not go away even when I quit terminal. I am using zsh. The code I pasted was:

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/***/***.git
git push -u origin master

On top of that, I can't even seem to figure out how to add my files to the repo. Help on how to not always have git:(master) before every bash command and how to make a repo? Thanks!

Upvotes: 2

Views: 1165

Answers (3)

jakob
jakob

Reputation: 1

deleting .git in usr/username did the trick for me. I was using Oh My ZSH

Upvotes: 0

pmichna
pmichna

Reputation: 4888

Do you mean you executed git init in / directory? If so, maybe just delete it (rm -rf /.git)?

If you want to create a repo just a create a directory and execute git init inside that directory.

Upvotes: 1

JB.
JB.

Reputation: 42154

You can un-init a git repository by simply erasing it. It's all in the .git directory of when you typed the git init command.

You can add files to the repo by using git add, but you'd better sort out the “my whole system is under git” issue first.

Upvotes: 3

Related Questions