I will upload my exercises, projects and other future codes on Github! But first let's talk about the basics of Git and Github.
What is Git?
Git is a free nd open source distributed version control system. This is popular program/tool that developers use to track changes on their code and files (version control). This is useful for coordinating work among programmers who collaboratively developing source code during their software development.
What is Github?
Github is a code hosting platform for version control and collaboration. As said, this is where you host your code so you and others can work together on projects from anywhere. This is where you pull the code, make modification and merge/upload the file. You can also make branches of the code so you can implement some of your ideas without affecting the master codebase. Github will track the changes, and commits so everyone can monitor changes.
Git basic commands:
1. git config --global "user.name" and git config --global "user.email" - This set ups your username and email for use in Git.
2. git init - initialize a directory to become a git repository
3. git add [file/files] - files will be put on the staging area while waiting for the commit command
4. git clone [url] - clone/download a repository/ies from a hosted location via URL
5. git commit -m "descriptive message"
List here are just some basic commands for git. You can search or watch youtube videos for more information and tutorials.
Pushing a local repository to Github
1. You must have your local repository in your PC (use git init for creating a local repository
2. type in the command
-git remote add origin [URL] - url is your created github repository
-git branch -M main (create a main branch)
-git push -u origin main (push files on main branch)