Clang format and code beautifier for Qt Creator Different developers use different styles with different IDE (i.e some people use space, some use tab) which may cause lots of changes in your git repository. One solution to this is to use some standard code formatting and beautifier. clang is a great tool for this purpose […]
Forking Projects You can “fork” the project if you want to contribute to an existing project to which you do not have push access. GitHub can make a copy of the project that is fully yours when you “fork” a project; it resides in your namespace, and you can push it. By creating what is
A git hook is a script that Git executes before or after an event such as committing, pushing, or receiving code. Git hooks are a built-in feature of Git that allows you to perform custom actions at specific points in the Git workflow. They are stored in the .git/hooks directory in a Git repository, and
1. Creating a branch It quite often happens that a software product is on a git server and developers add new features to the product. To make the job easier, developers usually create branches beside the master branch (which is the default branch) and work on their branch and once the changes are confirmed and
Sometimes you have made some changes into your local copy and you don’t want to make a commit because your code doesn’t compile, but something came up and you should change your branch for instance and you will lose your local changes. In this situation, you can stash your changes and save your changes and
Git cherry-picking is a feature in Git that allows you to select and apply specific commits from one branch to another, rather than merging the entire branch. This can be useful when you want to apply a specific change or fix to a different branch, without merging the entire branch. Imagine the following situation, you
Diff Before following this post, make sure you have already set up everything from my other post regarding the configuration of the git environment. Diff command will allow you to compare two different commits, let’s set up a repository:
1
2
3
4
5
6
7
8
9
10
11
12
13
mkdir repos1
mkdir repos2
mkdir remote_repose
cd repos1
git init
git init--bare../remote_repose/
git remote add origin../remote_repose/
touchA.txt
git add-A
git commit-a-m'A Added'
git push--set-upstream origin master
Now in the second repository, we make some changes:
Managing remotes You need to know how to handle your remote repositories in order to be able to work on any Git project. Remote repositories are copies of your project which are hosted elsewhere on the Internet or the network. You can have several of them,
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.