I am a bit curious about pushing a locally created folder(project) to Github. Is it possible? Please let me explain what I have already done. I am using Git for Windows on Windows 8.1 64-bit.
- Created a new project using init command in the Git local root i.e. projects. Please refer the bash commands and messages below.
$ git init fresh-project Initialized empty Git repository in D:/MyDev/projects/fresh-project/.git/
2.
$ ls fresh-project/
**$ cd fresh-project**
**ls**
**$ git status**
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
**Used $ code hipster.txt**
To create the file by opening VSCode and added some text.
**$ git status**
On branch master
No commits yet
Untracked files: (use "git add ..." to include in what will be committed) hipster.txt
nothing added to commit but untracked files present (use "git add" to track)
**$ git add hipster.txt**
**$ git status**
On branch master
No commits yet
Changes to be committed: (use "git rm --cached ..." to unstage) new file: hipster.txt
**$ git commit**
hint: Waiting for your editor to close the file... [main 2020-04-12T09:45:20.658Z] update#setState idle [main 2020-04-12T09:45:50.660Z] update#setState checking for updates [main 2020-04-12T09:45:50.870Z] update#setState idle [master (root-commit) b427f7c] Adding new file with hipster ipsum This was done with VSCode in 12th April 2020 15:20 1 file changed, 1 insertion(+) create mode 100644 hipster.txt
11.
$ git status On branch master nothing to commit, working tree clean
After the 11th step I want to push the whole local repository to Github.com. I haven't created a
repository in Github with the name of 'fresh-project'.
What else do I have to do to make this to happen?
Thanks and regards, Chiranthaka