Git is a distributed version control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows.
GitHub is a cloud-based hosting service that helps you manage Gitrepositories
Why is the GitHub account important?
GitHub is a file version control system that allows you to share code and do its branching.
Git is a “version control system,” what’s that mean? When developers are creating something (an application, for example), they are changing the code and releasing recent versions.
Version control systems keep these revisions straight and store the modifications in a central repository. This allows developers to collaborate, as they can download a recent version of the software, make changes, and upload the newest revision. Every developer can see these recent changes, download them, and contribute.
Similarly, people who have nothing to do with the development of a project can still download the files and use them.
Now, apart from that, GitHub allows branching, which means one group may want to design software in their own way, e.g. You have a business theme and a student theme.
Now, let’s push to GitHub
- Create a new Github account or log in to your Github account: https://github.com/
- Create a new repository by clicking on the + sign on your profile. Then click on new repository.
- Create a new repository, give a name, description (optional), make it public, create a readme file
4. After successfully creating the new repository, it will be displayed on your account. Then view it and clone the project by copying the link or downloading it to your PC.
5. open your Git bash or CMD in any location in your system where you prefer the project. Then write this command
git clone https://github.com/israelkingz/my_first_project.git <your own link>
it automatically downloads the project to your system
6. Then copy the file and the folder you want to push to GitHub for your clone project
7. Then return to your cmd, change the directory to the folder using
cd my_first_project <your repo name>
8. now add the file/folder using git add . <. implies add all>
9. check the status of the file or folder added using git status
10. Then you can commit to your master origin using git commit -m “my first project” <-m master branch>
It will ask for your Github account Authentication by prompting up a login interface
11. Once you have successfully logged in, commit your new file to your repository
12. Finally, you push to github account git push origin
once you reload the repository to your github, you should see the committed files or folders
You have successfully committed to your GitHub repository.
For clarification, look at my own process to solve any error or challenge when following the same process
Do well to comment if this helps.