How do I create a new GitHub repository from a local branch from a cloned repo with visual studio?
Been searching and trying for 3 days but nothing works plz help
CodePudding user response:
you can reveal the files in file explorer from that repository and after that takes the file without git and implement a new git repository
CodePudding user response:
In terminal
$ cd PARENT-FOLDER
$ git init REPOSITORY-NAME
Initialized empty Git repository in /Users/local/repo/.git/
Creates a new folder on your computer, initialized as a Git repository
$ cd REPOSITORY-NAME
Changes the working directory
$ mkdir docs
Creates a new folder called docs
$ cd docs
$ git checkout --orphan newbranch
Creates a new branch, with no history or contents, called newbranch , and switches to the newbranch branch
$ git rm -rf .
Removes the contents from your default branch from the working directory
git add .
git commit -m ‘’
$ git remote add origin https://github.com/USERNAME/REPOSITORY.git
$ git push -u origin BRANCH
commits & pushes changes to repo