github - What git command lines can i use to remove all my local directory on my computer? -


so created empty git local directories on computer under different files. command line can use clear of them , start over? , follow question, why can't see current local git directories?

using terminal, navigate folder contains git repository.

$ cd <path/to/folder> 

then verify existence of .git folder using ls -la. folders hidden (note "dot" before name).

remove .git folder using:

$ rm -rf .git 

this remove git repository project folder, allowing start on fresh.

go remote repository account (i.e. github) , create empty new repository.

than copy repository url this:

https://github.com/<username>/<repository>.git 

initialize new git repository in project folder (if want):

$ git init 

than add project files version control:

$ git add . 

commit files, them ready send remote repository:

$ git commit -m 'first commit remote repo' 

add remote origin local git:

$ git remote add origin <repo_url> 

verify origin branches

$ git remote -v 

finally, push first commit remote repository

$ git push origin master 

Comments