J
J
Johnny Show2017-12-21 22:27:03
git
Johnny Show, 2017-12-21 22:27:03

How to properly upload a project to github \ gitlub?

I created ssh keys, copied them and threw them into the profile settings. Then I followed the instructions from the official github site, but instead of the project in the form of folders and files, one file appears with the name of the project and the commit.
How to properly upload a project so that folders with attached files are displayed.
Also, after I changed the settings, after pushing or pooling, it asks for a username and password.
I reinstalled the keys and all the settings, but the password and login still asks when pushing.
In general, if it is not difficult to answer, I will be glad to answer an additional question. And so the main question is in the title. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ipokos, 2017-12-21
@X-core

After initializing the git, make the first commit (usually it has a gitignor, a readme, there may be something in the little things)...
Add (locally) the necessary folders/files to the git index: git add /folder/file.php or git add /your_project_folder /
After commit: git commit -m'Upload my project to github or etc'
And push: git push origin master
// Before commit, you can see what files were added to the index git status
so you added like this:
git remote add origin https://...
remove the local remote and add like this:
git remote add origin [email protected]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question