This tutorial is basically aimed for the users who are learning about uploading their first project (repository) in GitHub via version control tool called Git. It’s obvious that confusion hovers around you when you’re just getting started with Git.
Git is a version control system aimed to handle project at speed, data integrity, and support for distributed, non-linear workflows.
In the following screen, you can copy it down where you need it if you click the button (right side of the screen) to “clone in desktop”.
From here you run the following commands to “connect” your existing project to your repo on GitHub. (This is assuming that you created your repo on GitHub and it is currently empty)
Go to your local project folder then Right click > Git Bash Here (Open Git in Console Mode). Now, you need to follow the following steps.
This will start monitoring your changes (logs in .git folder)
git add .
. [dot] will add all your files & folders
git commit -m "This is my initial commit"`
This will records changes to the repository
git remote add origin https://github.com/bjungbogati/my-project-url.git`
creates a new remote called origin located at my-project-url
git remote -v
see your linked repository
checks the current state of the repository (optional)
git push -u origin master
-u is short version of –update
push the commits in the local branch named master to the remote named origin (GitHub)
Note: You’ll also be requested to sign in to GitHub account.
git init git add . git commit -m "This is my initial commit" git remote add origin https://github.com/username/url.git git push -u origin master