How To Upload Files To Github From Windows
How to Push to GitHub
Pushing lawmaking to GitHub means to upload your projection lawmaking to the GitHub.com code-hosting service. In this short article, we'll show yous how to exercise this using Git on the Command Line as well as through a desktop GUI.
The Git Cheat Sheet
No demand to think all those commands and parameters: get our popular "Git Crook Sail" - for free!
How to Create a Local Repository
Start, you need to have a local repository for your actual project code. (If you already have this, skip to the adjacent section below titled "How to Push to GitHub".)
Using Git on the Control Line
Open the control line ("Terminal" on the Mac, "Git Fustigate" on Windows) and change into your project'due south base of operations directory. There, y'all can create a new Git repository:
$ cd projects/my-projection $ git init Equally a starting time step, you lot can add all of your current files to the repository and so bundle these in a commit:
$ git add together . $ git commit -1000 "Initial commit" Using Git in a Desktop GUI
In instance you're using a desktop GUI like the Tower Git client, the process is very piece of cake: you can simply drag your project's base folder into Tower and have it create the Git repository for you.
You tin can and then add all files to the Staging Expanse and make your first commit:
Now, y'all are prepare to button your code to GitHub!
How to Push to GitHub
Earlier you lot tin upload your code to GitHub, you demand to create a remote repository in your GitHub account.
Using Git on the Command Line
If you're working with Git on the Command Line, yous'll have to open the GitHub.com interface in your browser. Right on the "Dashboard" view, y'all can see a push to create a new repository:
Then, on the projection'south main folio, yous can use the green "Code" push to reveal the repository's remote URL and re-create it to your clipboard:
You can so connect this remote repository to your local Git repository with the following command:
$ git remote add origin <remote repository URL> The terminal step is to push your changes from your local repository to your new remote repository:
$ git push origin principal Using Git in a Desktop GUI
In case you're using a desktop GUI like the Tower Git client, y'all can only follow these simple steps:
- correct-click the "Remotes" section header in the sidebar and select "Add Remote Repository"
- in the dialog, you lot can enter a name (eastward.m. "origin") and the remote repo's URL on Github; additionally, you tin can select your GitHub account
- confirm the dialog and the remote will at present exist connected with your local repository
- from now on, you tin merely use the "Button" push in the toolbar to upload new changes to the remote on GitHub
Larn More
- Check out the chapter Starting with an Unversioned Projection in our free online book
- More oftentimes asked questions virtually Git & version command
How To Upload Files To Github From Windows,
Source: https://www.git-tower.com/learn/git/faq/push-to-github/
Posted by: marleyearost.blogspot.com

0 Response to "How To Upload Files To Github From Windows"
Post a Comment