Git is a free and open source distributed code management and Version control system that is distributed under the GNU General Public License version 2.
BLA !!! BLA !!! BLA!!!
Git is so simple, you have to know some commands to run your projects. Let's start -
Firstly open your terminal and write
git clone <branch-id>
- basically used to clone you remote repository to local repository.
Repository is a collection/bundle of files.
After working on repository, open terminal and write
git add .
- it will add all files to git staging area.
The staging area is like a rough draft space, it's where you can git add the version of a file or multiple files that you want to save in your next commit
git commit -m"<commit-message>"
- it will add commit to repository.
git push origin <branch-name>
- it will push changes to the remote repository.
git switch <branch-name>
- it will switch you from one branch to another
git branch -d <branch-name>
- it will delete the local branch, which is not publish to Github.
git branch -D <branch-name>
- it will delete the remote branch.
git checkout --<file-name>
- it will remove changes add to the file.
git checkout -- .
- it will remove changes add to all files.
If it really hard to remember just learn 1st five commands. That's enough to make your projects run remotely. Hope you love this article.
Β