Skip to main content

Git

12th October, 2022

Updated: 12th October, 2022

    git tips

    config

    git config user.email "blah@blah"
    git config user.name "Name"

    Ignore CHMODs

    git config core.filemode false

    Show only files that will be committed

    git diff --cached --name-status

    only show files to be committed

    git diff HEAD --name-only

    find differences

    git diff --quiet HEAD

    Cherrypick from another repo

    Here's an example of the remote-fetch-merge.

    cd /home/you/projectA
    git remote add projectB /home/you/projectB
    git fetch projectB
    git cherry-pick <first_commit>..<last_commit>

    source

    Simple git log

    git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short

    90f1861a-8885-4c7b-a63f-93d9e984d496

    Created on: 12th October, 2022

    Last updated: 12th October, 2022

    Tagged With: