How to pull specific directory with git

cd into the top of your repo copy git fetch git checkout HEAD path/to/your/dir/or/file Where “path/…” in (3) starts at the directory just below the repo root containing your “…/file“ NOTE that instead of “HEAD”, the hash code of a specific commit may be used, and then you will get the revision (file) or revisions … Read more

How to merge remote master to local branch

From your feature branch (e.g configUpdate) run: git fetch git rebase origin/master Or the shorter form: git pull –rebase Why this works: git merge branchname takes new commits from the branch branchname, and adds them to the current branch. If necessary, it automatically adds a “Merge” commit on top. git rebase branchname takes new commits … Read more

Does “git fetch –tags” include “git fetch”?

Note: starting with git 1.9/2.0 (Q1 2014), git fetch –tags fetches tags in addition to what are fetched by the same command line without the option. To fetch only tags: git fetch <remote> ‘refs/tags/*:refs/tags/*’ In details: See commit c5a84e9 by Michael Haggerty (mhagger): Previously, fetch’s “–tags” option was considered equivalent to specifying the refspec refs/tags/*:refs/tags/* … Read more

How to undo a git pull?

Or to make it more explicit than the other answer: git pull whoops? git reset –keep HEAD@{1} Versions of git older than 1.7.1 do not have –keep. If you use such version, you could use –hard – but that is a dangerous operation because it loses any local changes. To the commenter ORIG_HEAD is previous … Read more

How do you attach a new pull request to an existing issue on github?

Adding a pull request to an existing upstream issue is easy assuming you forked using the normal github means. Simply reference the issue in your commit message using any of the supported keywords: close closes closed fix fixes fixed resolve resolves resolved For example: “this commit fixes #116” The text referencing the issue does not … Read more

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