I have just built a project about realtime chat , now I just want to upload it to the github reposity my folder structure look like this enter image description here
I don't know how to upload the whole project to github by git bash command line
I have read the github docs , but I just can only upload 1 folder per time (just "client" or "server" folder per time) , can someone show me how to upload the whole folder (the "chat-app" folder) to github?
/node_modules
It will prevent git from uploading node_module (which you can easily recreate with npm install
).
git init
in your folder (chat-app). It will create a new local Git repository .you can then use the full power of git in this folder.
Then you have to add modificated files to stage . many possibilities here some uses git add .
or git add -A
or you can do it file by file git add [filename]
(Without brackets)
After that you can commit your modification with a message to tell what modifications you made : git commit -m "my super commit message"
You also have to specify git a remote repository git remote add [name] [url]
(for exemple : git remote add github http://github.com/myUsername/myRepo.git
And finally you can push your modification : git push [remoteName] [remoteBranch]
( git push github master
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.