‘" t ." Title: git-sync ." Author: [see the “AUTHOR” section] ." Generator: DocBook XSL Stylesheets v1.78.1 <docbook.sf.net/> ." Date: 04/20/2016 ." Manual: \ & ." Source: \ & ." Language: English ." .TH “GIT-SYNC” “1” “04/20/2016” “\ &” “\ &” ." —————————————————————– ." * Define some portability stuff ." —————————————————————– ." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ." bugs.debian.org/507673 ." lists.gnu.org/archive/html/groff/2009-02/msg00013.html ." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie n(.g .ds Aq (aq .el .ds Aq ’ ." —————————————————————– ." * set default formatting ." —————————————————————– ." disable hyphenation .nh ." disable justification (adjust text to left margin only) .ad l ." —————————————————————– ." * MAIN CONTENT STARTS HERE * ." —————————————————————– .SH “NAME” git-sync - Syncs local changes with the server&. .SH “SYNOPSIS” .sp fIgit-syncfR [fIOPTIONSfR] [ fIbranchnamefR ] .SH “DESCRIPTION” .sp fIgit-sync(1)fR fetches the latest repository from the server, rebases/merges the current branch against the changes in the integration branch, then pushes the result up to a branch on the server of the same name&. (Unless told not to&.) .sp If a branch name is given, it is assumed that it is a remote branch that you want to start doing work on with full fIgit-sync(1)fR support&. The branch will be fetched from the server, checked out, and a control file created&. .sp There is a lot of logic to make sure that rebasing/merging happens safely and with minimal conflicts regardless of things like squashes, multiple people working on the same feature branch, etc&. .SH “OPTIONS” .sp The effective default is “fBgit sync -r -i -ffR”&. .PP fB-r, --rebasefR .RS 4 Rebase instead of merge against the integration branch (fBdefault: truefR) .RE .PP fB--mergefR .RS 4 Merge instead of rebase against the integration branch .RE .PP fB-f, --forcefR .RS 4 Force the push; defaults to fBtruefR if fB--rebasefR is used .RE .PP fB-l, --localfR .RS 4 Do not do a push; gets remote changes, but does not update the server .RE .PP fB--infofR .RS 4 Informational messages; show the major things this is doing (fBdefault: truefR) .RE .PP fB-q, --quietfR .RS 4 Quiet messages; only show errors .RE .PP fB-v, --verbosefR .RS 4 Verbose messages; show lots of details on what this is doing .RE .PP fB--versionfR .RS 4 Print version and exit .RE .SH “CONFIGURATION” .sp Options for fIgit-sync(1)fR are set using fIgit-config(1)fR&. .PP fBgitProcess&.remoteNamefR .RS 4 Allows you to explicitly set the remote server name to use&. Defaults to the first server name reported by fIgit-remote(1)fR&. .RE .PP fBgitProcess&.integrationBranchfR .RS 4 Allows you to explicitly set the integration branch to use&. Defaults to “master”&. .RE .PP fBgitProcess&.defaultRebaseSyncfR .RS 4 Should fIgit-sync(1)fR use fB--rebasefR by default instead of fB--mergefR? Defaults to fBtruefR&. .RE .SH “EXAMPLE” .sp Assuming that the current branch is called “interesting_changes” and the integration branch on the server is “master”, typing “git sync” will do roughly the following for you: .sp .if n {\ .RS 4 .} .nf $ git fetch -p # if there have been changes on the remote fb since the last sync $ git rebase origin/interesting_changes $ git rebase origin/master # verify nothing has changed in the window of time since the last check $ git push origin +interesting_changes:interesting_changes .fi .if n {\ .RE .} .SH “CONTROL FILES” .PP fBgitprocess-sync-fR*fB--fR* .RS 4 To help make the process simpler and more reliable, fIgit-sync(1)fR will put a file in the “fI&.gitfR” directory that contains the SHA-1 of the last successful sync to the server&. fIgit-to-master(1)fR will remove the file as part of its normal “housekeeping&.” .RE .SH “SEE ALSO” .sp fBgit-processfR(1), fBgit-to-masterfR(1), fBgit-new-fbfR(1), fBgit-pull-reqfR(1) .SH “BUGS” .sp Known bug list: github&.com/jdigger/git-process/issues?state=open .SH “AUTHOR” .sp git-sync has been written primarily by Jim Moore&. .SH “RESOURCES” .sp Main web site: github&.com/jdigger/git-process