How to Upload a Project to GitHub Repository using Command Line

How to Upload a Project to GitHub Repository using Command Line

Web Tech Knowledge

2 недели назад

293 Просмотров

In this video, I'd like to share with you guys, about how to add an existing project from local computer to a remote repository on GitHub, for the first time, step by step.

How can we push code or files from local PC to github using command line? I am using windows operating system. For terminal program I have 'Git for Windows'. First of all you should be logged in to github and SSH keys from PC should be added to your github account so that communication from PC to github can be possible. Then create a new repository at github. Next page shows useful commands that can be used to push local files to Github.

Browse to your project directory in your PC. Open terminal or command line tool or terminal in the same directory.

Use following commands:
Initialize local directory as a git repository using:
git init

Add all files to local repository using:
git add .
Now files are staged for first commit

Check status and see all files staged for commit using:
git status

Commit files that are staged in local repository using:
git commit -m "First commit"

Specify remote repository url and add url for remote repository where local repository will be pushed using:
git remote add origin repo-url

Push the code in local repository to Github using:
git push -u origin master

See github repo page and your files will be there that are pushed.

Here are all the commands in sequence:

git init
git add .
git status
git commit -m "any comment here in quotes"
git remote add origin repo-url
git push -u origin master


Found this video helpful and want to support?

Buy me a Coffee : https://www.buymeacoffee.com/yaminshakil

Join this channel to get access to perks:
https://www.youtube.com/channel/UCeNYDojo4nU2sbHz1sMsBXw/join

Thanks For Watching.
I hope This video was helpful. If you have any questions then let me know in the comment section.


Best of luck


#webtechknowledge


You can connect with me with the given links below:



Facebook Link: https://www.facebook.com/yaminshakil07


Instagram Link: https://www.instagram.com/yamin_shakil


Twitter Link: https://twitter.com/yaheashakil


#howtouploadprojecttogithubrepository

Тэги:

#how_to_upload_project_on_github #upload_file_to_github_command_line #add_project_to_github_command_line #how_to_upload_project_to_github #how_to_upload_my_project_to_github #how_to_create_a_github_repository #upload_project_to_github #how_to_upload_files_to_github_from_windows_using_git_bash #how_to_push_code_to_github #how_to_upload_your_project_to_a_github_repository #how_to_make_repository_and_upload_project_on_github #how_to_upload_my_project_to_github_repository #git_tutorial
Ссылки и html тэги не поддерживаются


Комментарии: