This content originally appeared on DEV Community and was authored by Abhishek Kumar
What is Github?
In short, Github is an internet code hosting version control platform which offers any individual or a team to collaborate on different projects(like open source projects) around the globe.
Let's deep dive into it!
Why Github ?
Lets take an example of you and your team members that you all are collaborating on any project and made some changes on that project as you're not the only one who are collaborating on that particular project there are many more people who are collaborating to that same project, now you may be wondering how do these people know that the changes i made are in this particular folder or i deleted this feature of code and replace it by mine better functionality codebase...and this problem is solved by git..
So "Git" is a version control system and "Github" is a website(GUI interface) that uses git for its functionality...
Some Basic Terms You Should Know Before Using GitHub...
- Repository
Its just a type of folder contains the files and the history of the changes that you made into that file.
2.Branch
As you're working on a copy of a project(let say) and you made some changes into that project, there will be a very high chance of error in that codebase which can affect the flow of working of other person who is working on the same project, so to avoid that scenario we use branches in the project.
[Note that Main(master) is the by default branch of any project]
3.Clone
Clone helps you to make a copy of a repository from github into your local directory(hard drive or ssd or any other external storage device).
4.Fork
Forking any repo basically means you have a copy of a another person's project into your github account that means there are two github repo of that same project one in that person's account and one in your github account.
5.Head
Head is just a pointer which refer just the current branch or When you switch branches with git checkout, the HEAD revision changes, and points the new branch.
6.Master
It's a naming convention for git branch. It's a a default branch of git.
For ex. you fork a repo into your github account, then the main(default) branch of that repo is the master branch.
7.Merge
Merging is a process to put a forked history back together. The git merge command facilitates you to take the data created by git branch and integrate them into a single branch.
8.Pull Request
The term Pull is used to receive data from GitHub. It fetches and merges changes on the remote server to your working directory. The git pull command is used to make a Git pull.
Pull requests are a process for a developer to notify team members that they have completed a feature. Once their feature branch is ready, the developer files a pull request via their remote server account. Pull request announces all the team members that they need to review the code and merge it into the master branch.
9.Push
The push term refers to upload local repository content to a remote repository. Pushing is an act of transfer commits from your local repository to a remote repository. Pushing is capable of overwriting changes; caution should be taken when pushing.
10.Stashing
Sometimes you want to switch the branches, but you are working on an incomplete part of your current project. You don't want to make a commit of half-done work. Git stashing allows you to do so. The git stash command enables you to switch branch without committing the current branch.
11.Upstream and Downstream
The term upstream and downstream is a reference of the repository. Generally, upstream is where you cloned the repository from (the origin) and downstream is any project that integrates your work with other works. However, these terms are not restricted to Git repositories.
For more terms refer: (https://training.github.com/downloads/github-git-cheat-sheet/)
Keep learning and sharing knowledge -.-
This content originally appeared on DEV Community and was authored by Abhishek Kumar
Abhishek Kumar | Sciencx (2022-02-06T16:14:25+00:00) GIT & GITHUB. Retrieved from https://www.scien.cx/2022/02/06/git-github/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.