Ignore whitespaceīy default git is a bit fussy about whitespace and will print a warning when merging files where whitespace differs. Within a git repository, and omitting the -global switch. $ git config -global user.email commands configure your "global name" and "global email" you canĪlso configure them on a per-project basis by running the command from If you're committing to a public repository it can also be useful to include your contact details, so let's configure git to use our real name and email address: $ git config -global user.name "Your Name" Whenever you commit to a repository git records your username along with the commit. It's very easy to edit it by hand if you want to undo any changes. You'll find the results of git config commands stored in ~/.gitconfig. Turn it on: $ git config -global color.ui "auto" Coloured outputĬolour highlighting can often make things easier to read. They make life a little easier when working with Git in a terminal. '2days' can be removed from the definition for flexibility, in which case the command should be used like 'git lg 3days' instead of 'git lg'.When starting to use Git on a new computer there are several steps that I always take before I start work. ' lg' prints the commit version log in a legible form (in my opinion) and constrains it to 2days.Settings like my email override the ones I defined in the global config file. email = rebase = true pullb = "!git pull git submodule foreach git pull origin master" fs = submodule foreach git pushs = log origin/master.master lg = log -graph -pretty=tformat:'%h %C(cyan)%C(reset)%Cgreen%d%Creset %s - %C(yellow dim)%an%C(reset)' -all -since 2days lgme = log -graph -pretty=tformat:'%h %C(cyan)%C(reset)%Cgreen%d%Creset %s - %C(yellow dim)%an%C(reset)' -all -since 1week -author Ines socmerge = "!git fetch git submodule foreach git pull origin master git merge origin/master" ~/blender-git/blender/.git/config - this is what I *added* meta = yellow bold frag = white dim func = white ul old = red new = green whitespace = yellow reverse #header, added or updated (but not committed), changed (but not added in the #index), untracked, branch, or nobranch added = green changed = yellow untracked = red #prompt, header, help or error, #plain (context text), meta (metainformation), frag (hunk header), #func (function in hunk header), old (removed lines), new (added lines), #commit (commit headers), or whitespace (highlighting whitespace errors). current = white reverse local = white #branch, remoteBranch, tag, stash or HEAD for local branches, #remote-tracking branches, tags, stash and HEAD, respectively. Name = Ines Almeida email = editor = pico ci = commit co = checkout rb = rebase -i br = branch st = status df = diff undo = reset -soft HEAD^ #show the log of diffs for a file > git fdiff source.c fdiff = log -u #diff a specific revision against it's parent > git diffr hash diffr = "!f() f" lg = log -graph -pretty=tformat:'%h %C(cyan)%C(reset)%Cgreen%d%Creset %s - %C(yellow dim)%an%C(reset)' -all -since ui = true # colors and presentation options: # - normal, black, red, green, yellow, blue, magenta, cyan, or white # - bold, dim, ul, blink, and reverse #current, local, remote (a remote-tracking branch in refs/remotes/), #upstream (upstream tracking branch), plain (other refs).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |