Documentation ¶
Index ¶
- func CheckoutHead() *exec.Cmd
- func DeepenedFetch(remoteName, ref string) *exec.Cmd
- func Fetch(remoteName, ref string) *exec.Cmd
- func Gc() *exec.Cmd
- func InitGit(dir string) *exec.Cmd
- func Merge(branch string) *exec.Cmd
- func RemoteAdd(remoteName, remote string) *exec.Cmd
- func RemoteRemove(remoteName string) *exec.Cmd
- func ResetMerge() *exec.Cmd
- func SetConfig(key, value string) *exec.Cmd
- func ShowLastLog() *exec.Cmd
- func UpdateSubmodules() *exec.Cmd
- type Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckoutHead ¶
CheckoutHead returns command git checkout -qf FETCH_HEAD
func DeepenedFetch ¶
DeepenedFetch deepens the fetch history. It is similar with Fetch but accepts 500 more commit history than last Fetch operation by --deepen=500 option. e.g. git fetch origin +refs/heads/onboarding --deepen=500
func Fetch ¶
Fetch fetches changes by ref, ref can be a tag, branch or pr. --depth=1 is used to limit fetching to the last commit from the tip of each remote branch history. e.g. git fetch origin +refs/heads/onboarding --depth=1
func Gc ¶
SetConfig returns command: git config --global $KEY $VA e.g. git config --global user.name username
func RemoteRemove ¶
RemoteRemove removes the remote origin for the repository.
func ResetMerge ¶
ResetMerge reset last merge It return command git reset --merge
func SetConfig ¶
SetConfig returns command: git config --global $KEY $VA e.g. git config --global user.name username
func ShowLastLog ¶
ShowLastLog returns command git --no-pager log --oneline -1 It shows last commit messge with sha
func UpdateSubmodules ¶
UpdateSubmodules returns command: git submodule update --init --recursive