I am just learning how to use git and would like to follow a project. So I clone the project and no I have the most new code.
If I want to add a patch (or more) to that code, what is the best way to do that (and run make and make install) and still be able to git pull from the master repo without creating a conflict?
I have tried making a branch, but I’m not sure if this is the right way.
I’d just like to be able to keep up with new code in master, but be able to apply my own patches as new versions are pushed.
I’d like to know where I can learn how to do this, but I’m not sure what to google for.
You are probably looking for
git rebase: Create a local branch from the remote tracking branch and invokegit config branch.mylocalbranch.rebase true(where ‘mylocalbranch’ is the name of your local branch). Now you can make your local patches and commit them. Everytime you fetch updates withgit pullyour local modifications are ‘rebased’ (applied on top of what you’ve just pulled).Be careful not to push your local modifications (e.g. the HEAD of your local branch) to the remote as this is probably not what you want. See
man git-rebasefor further details.