What I can do to resolve “1 commit behind master”?

Before you begin, if you are uncomfortable with a command line, you can do all the following steps using SourceTree, GitExtensions, GitHub Desktop, or your favorite tool. To solve the issue, you might have two scenarios: 1. Fix only remote repository branch which is behind commit Example: Both branches are on the remote side ahead … Read more

How to prevent many git conflicts when rebasing many commits?

Fortunately, git has a mechanism for dealing with exactly this problem called git rerere – essentially, if you have git rerere enabled, then each time your resolve a conflict the fact that you resolved that exact conflict in a particular way is remembered. If the same conflict comes up again, the same resolution is automatically … Read more

Is there some kind of ‘git rebase –dry-run’, which would notify me of conflicts in advance?

At the time of writing this (Git v2.6.1 v2.10.0), the git rebase command offers no –dry-run option. There is no way of knowing, before actually attempting a rebase, whether or not you’re going to run into conflicts. However, if you run git rebase and hit a conflict, the process will stop and exit with a … Read more

Git merge left HEAD marks in my files

Those are conflict markers. You’re still in the process of merging, but there were some parts that Git couldn’t merge automatically. You’ll need to hand-edit those parts to what you want them to be and then commit the results. For instance, in your particular case, you’d probably want to resolve it like this (note – … Read more

Choose Git merge strategy for specific files (“ours”, “mine”, “theirs”)

For each conflicted file you get, you can specify git checkout –ours — <paths> # or git checkout –theirs — <paths> From the git checkout docs git checkout [-f|–ours|–theirs|-m|–conflict=<style>] [<tree-ish>] [–] <paths>… –ours –theirs When checking out paths from the index, check out stage #2 (ours) or #3 (theirs) for unmerged paths. The index may … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)