Tags » Git

Undo a commit

git reset HEAD~

This leaves your working tree (the state of your files on disk) unchanged but undoes the commit and leaves the changes you committed unstaged (so they’ll appear as “Changes not staged for commit” in  18 more words


Stop git committing chmod changes

Pretty self explanatory. Just do this:

git config core.fileMode false

The documentation says this about it:

If false, the executable bit differences between the index and the 
working copy are ignored; useful on broken filesystems like FAT. 140 more words

git rebase

git pull --rebase origin master
First fetch the new master from the upstream repository, then rebase your work branch on that:

git fetch origin            # Updates origin/master
git rebase origin/master    # Rebases current branch onto origin/master

git setting user name & email

Setting your Git username for every repository on your computer

  1. Open Git Bash.
  2. Set a Git username:
    $ git config --global user.name "Sezayir Dagtekin"
  3. Confirm that you have set the Git username correctly: …
  4. 97 more words

[Git]Merging Conflicted PRs

  1. Update the master
  2. Checkout a new branch from the master

git checkout -b new-branch master

3. pull the conflicting PR from the remote branch in remote repository… 52 more words


[Git] Connection refused - Disable sslVerify

Background : To clone a git project
Error :

Solution :

git config --global http.sslVerify false

Git rename branch

Rename a local and remote branch in git

If you have named a branch incorrectly AND pushed this to the remote repository follow these steps before any other developers get a chance to jump on you and give you shit for not correctly following naming conventions. 66 more words