Please note that I read most of the suggestion o this page, but there are too many suggestions and I cannot find a proper way for my problem.
I created a new repository called demo-project
on GitHub and I want to push demo-project
that already on my local disk on D:\projects
folder. I cloned the repo to D:\projects
directory (first I move my project to another location) and then copied my project to that D:\projects
folder. Then I connect to GitGub, but it shows lots of changes that I did not make and after pushing the changes to the GitHub, it uses my work account instead of private GitHub.
So;
1. How should I push my changes to the repo on GitHub? Should I first clone that repo and then copy my project to the clone directory (D:\projects
)? Or is there an easier way e.g. connecting to repo and then push?
2. How can I use my private GitHub account automatically for this repo when I run commends when I am in this repository (D:\projects\demo-project
) on cmd? Should I run the following command for setting my private repo without --global
option?
git config user.name "[name]"
git config user.email "[email]"
git config user.password "[password]"