Using GIT, how can I selectively merge changes from one commit on another ‘fork’?

After trolling the waves of the IRC world, someone gave a great solution: git cherry-pick SHA1 –no-commit git add –patch Hopefully that helps anyone else with the same question! EDIT: OK, maybe it isn’t quite that simple. Here are the full steps: First you have to be in your repository, do the necessary cd-ing to … Read more

Git pull into wrong branch

git reset –hard ORIG_HEAD From the git reset man page (if you just did the pull): Undo a merge or pull $ git pull (1) Auto-merging nitfol CONFLICT (content): Merge conflict in nitfol Automatic merge failed; fix conflicts and then commit the result. $ git reset –hard (2) $ git pull . topic/branch (3) Updating … Read more

How can I make my local repository available for git-pull?

Five possibilities exist to set up a repository for pull from: local filesystem: git clone /path/to/repo or git clone file://path/to/repo. Least work if you have networked filesystem, but not very efficient use of network. (This is almost exactly solution proposed by Joakim Elofsson) HTTP protocols: git clone http://example.com/repo. You need any web server, and you … Read more

How can you git pull only the current branch?

Git already only pulls the current branch. If you have branch set up as a tracking branch, you do not need to specify the remote branch. git branch –set-upstream localbranch reponame/remotebranch will set up the tracking relationship. You then issue git pull [–rebase] and only that branch will be updated. Of course, all remote tracking … Read more

Git: Pulling a rebased branch

If Mr. Orange doesn’t mind losing his changes, he can fetch from the server, then checkout the the branch: git checkout A to get onto his local A branch. Then, assuming the remote is named “origin”, reset your local branch in favor of the remote branch: git reset –hard origin/A If he is concerned with … Read more

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