Git & GitHub -2
Git: Git?is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. git is also used for?source code management.
Difference Between the Main Branch and Master Branch?
There is no difference between the main and master branch in git. The Main or Master branch is a default branch when you create a repository. GitHub now uses main as its default branch. while others still use the master branch as a default branch.
Git:
Git is a distributed version control system, tracks changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Git is installed and maintained on your local system. Git is a command-line tool.
GitHub:
GitHub is a cloud-based platform that provides hosting for version control using Git. It is a service we use to store our project files. GitHub is designed as a git repository hosting service. GitHub is a graphical user interface.
Create a new repository on GitHub.
Difference between local & remote repositories it the local repository is?the one on which we will make local changes, typically this local repository is on our computer.
Git remote repositories are hosted on a server that is accessible to all team members.?
A git remote command is used to make remote connections such as connecting a Git local repository with GitHub remote repository.
Set your user name and email address, which will be associated with your commits.
领英推荐
Connect your local repository to the repository on GitHub.
Use the git remote command to connect the local repository to the GitHub repository.
git init?command transforms the current directory into a Git repository.
git remote add origin <URL_from_GitHub_repository>
Create a new file in project/Devops/Day-01.txt & add some content to it.
Push your local commits to the repository on GitHub
Git push: The git push command is?used to upload local repository content to a remote repository.
git push origin master
Thank you for reading article!