I learn All About Upload file to github command line. Today I will Know how to simply upload/connect project/application or file on github web-based platform using command line.It’s main used to help for used for version control, so First of all I will make a new repository on github and after I will fill the repository name and description.
Upload Project/Files On Github Using Command line
Also I learn About all the git push command, git commands, how to upload project on github without command line, github login, git add, git commit and push, git clone, git push origin master or many more.
Follow these steps to project/application to Github
Follow the few steps and successfully upload/sync file or project/application on github web-based platform using command line.
Follow these step by step learn to project/application to Github
- git init
- git add .
- git commit -m “Attach all available Working files”
- git remote add origin https://github.com/yourusername/your-professional-repository-name.git
- Upload/Sync of project/application from step by step require git pull origin master.
- git pull origin master
- git push origin master
upload/transmit a project/application to Github
git init git add . git commit -m "Attach all available Working files" git remote add origin https://github.com/USER_professional_NAME/DIRECTORY_NAME git pull origin master --allow-unrelated-histories git push origin master
Directory
Create New Repository
We need to make a new repository on GitHub website.
- first of all you can the upper-right corner of any web page, then click , after that simply click New fresh repository.
- using the main Owner Type select Box drop-down, choose the type of main account you wish to make a fresh the repository on.
- Type a File name for your repository, and an optional File description of your app Projects.
- Select to created the fresh repository first is a public type, second is a private type.
Create new repository usong https://docs.github.com On Offically Website Github
Fill the repository name as well as File description of your app Projects.
Now Open cmd & upload file to github command line
After That you can next step to the ope your Terminal(default command-line) on computer system. Use simple cd to path to the local application folder that you want to each directory publish on GitHub.
CD to navigate to your folder
cd/your_professional_folder_name
Initialize Local Directory
And then we will initialise our any application. Use the following the command to initialise the local system folder as Git repository.
git init
Add Local repository
Attach all the available files in the local Based folder to perform using the command following the.
git add .
This Great command stages all the available files in the folder, ready for commit.
Commit Repository
You can now commit the staged available Working files using the command following the. It is explanatory and helpful.
git commit -m "First commit Message"
Add Remote Repository url
And then, simply copy the remote repository URL provided by github web-based platform to you when you published your repository on GitHub.
After that we will attach the simply copied URL for your GitHub repository as remote repository using the source code following the.
git remote attach origin https://github.com/usrprofessionalname/your-professional-repository-name.git
This command attach our GitHub repository as a remote Based that you can then push or Added your local repository changes.
Push Local Repository to github
In the next this phase, utilise the following the command line in open your CMD(Terminal) to push or Added the local repository to GitHub. It will change with upload the any file or application on github web-based platform.
git push origin master
If you utilise -u in the command, it will need your partiality for remote with branch as well as you can easy way to utilise the command git push or Added In the future.
git push -u origin master
Pull Repository from github
Pull the proper branch from the upstream repository. This Best way will appoint the commit history execute without any changes.
git pull origin master
All the below step by step run these all the command to utilise transfer the file as well as application projects on github.
cd/your project directory git init git add . or git add ['filename'] git commit -m "Attach all available Working files" git remote add origin https://github.com/yourgoodusername/your-professional-repository-name.git git pull origin master git push origin master
So finally you can just few minutes. We have 100% successfully upload/sync and save the project or file on github web-based platform using command line
Web Programming Tutorials Example with Demo
Read :
Summary
You can also read about AngularJS, ASP.NET, VueJs, PHP.
I hope you get an idea about upload file to github command line.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.