What does git rev-parse do?

git rev-parse is an ancillary plumbing command primarily used for manipulation. One common usage of git rev-parse is to print the SHA1 hashes given a revision specifier. In addition, it has various options to format this output such as –short for printing a shorter unique SHA1. There are other use cases as well (in scripts and other tools built on top of … Read more

merge one local branch into another local branch

First, checkout to your Branch3: Then merge the Branch1: And if you want the updated commits of Branch1 on Branch2, you are probaly looking for git rebase This will update your Branch2 with the latest updates of Branch1.

How to pull a specific branch from Github

If you did a clone, then all branches should be available to you. You need to checkout the branch. git checkout todo-mvvm-databinding If the branch isn’t available for whatever reason, then you can create it and then pull it: git checkout -b todo-mvvm-databinding (-b specifies “create branch”) git pull origin todo-mvvm-databinding will fetch and merge this branch into … Read more

How can I delete a file from a Git repository?

Use git rm. If you want to remove the file from the Git repository and the filesystem, use: But if you want to remove the file only from the Git repository and not remove it from the filesystem, use: And to push changes to remote repo

What is the difference between git rm –cached and git reset ?

With git rm –cached you stage a file for removal, but you don’t remove it from the working dir. The file will then be shown as untracked. Take a test drive With git reset <file> you can unstage a file. In the example above you might want to use git reset test to unstage the removal.

Filename too long in Git for Windows

Git has a limit of 4096 characters for a filename, except on Windows when Git is compiled with msys. It uses an older version of the Windows API and there’s a limit of 260 characters for a filename. So as far as I understand this, it’s a limitation of msys and not of Git. You … Read more

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