03 February 2015

Commit Message Format


git push origin --delete <branchName>

To see an old version of a file, use git show REVISION:path/to/file. For example, to show the 4th last commit of the file src/main.c, use git show HEAD~4:src/main.c.

Text File Merge

Conflicts if:

  • Both branches modify the same line
  • Two branches modify continuous lines. For example, branch A modifies line 1. Branch B modifies line 2.

No conflicts if:

  • One branch modifies one line. The other branch add a new line.
  • Both branches add new line (adding lines means inserting lines or appending lines).


The following configuration applies o HTTP and HTTPS git URLs. But a http_proxy environment variable only applies to Git HTTP URLs. https_proxy environment variable only applies to Git HTTPS URLs.

  proxy = www.proxy.com:80

The abover configuration is equivalent to http.proxy.




package main

import "fmt"

func main() {
	fmt.Println("hello, world")

Remve the line for Println. git diff produces:

diff --git a/main.go b/main.go
index 50e8d8d..ba4f19d 100644
--- a/main.go
+++ b/main.go
@@ -3,5 +3,4 @@ package main
 import "fmt"

 func main() {
-       fmt.Println("vim-go")