![git add remote to local repository git add remote to local repository](http://jlord.us/git-it/assets/imgs/clone.png)
git remote add origin sammy/my-new-project.git.Add new remote origin (in this case, GitHub) the -m 'Added my project' is the message that will be included alongside the commit, used for future reference to understand the commit. The git commit command creates a new commit with all files that have been “added”. The git add command is used to tell git which files to include in a commit, and the -A argument means “include all”.
#Git add remote to local repository software
git directory in your project folder which the git software recognizes and uses to store all the metadata and version history for the project. Note: if you already have an initialized Git repository, you can skip this command Make sure you are in the root directory of the project you want to push to GitHub and run: Through the rest of this tutorial we’ll assume your GitHub username is sammy and the repo you created is named my-new-project (So you’ll need to swap those out with your actual username and repo name when copy/pasting commands) Step 2: Initialize Git in the project folderįrom your terminal, run the following commands after navigating to folder you would like to add: Initialize the Git Repo It doesn’t really matter because we’re just going to override everything in this remote repository anyways. You can choose to either initialize a README or not. Sign in to GitHub and create a new empty repo page. To initialize the repo and push it to GitHub you’ll need:
![git add remote to local repository git add remote to local repository](http://i.stack.imgur.com/yO2Iu.jpg)
GitHub takes this even further by letting you connect with coworkers, friends, organizations, and more.
![git add remote to local repository git add remote to local repository](http://images.osteele.com/2008/git-workflow.png)
#Git add remote to local repository code
It also allows you to very nicely navigate and view your code on the web. It’s a convenient and mostly worry-free method for backing up all your code repos. People tend use GitHub though in their business or development workflow as a managed hosting solution for backups of their repositories. Git is distributed version control, meaning the entire repo and history lives wherever you put it. GitHub is simply a cloud-hosted Git management tool.