-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit-backup.1
117 lines (83 loc) · 2.06 KB
/
git-backup.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.TH GIT-BACKUP 1 "2019-12-11" "git-backup 0.2.1" "Git Manual"
.SH NAME
git-backup \- create a backup commit from uncommited changes
.SH SYNOPSIS
.B git\-backup
[\fIOPTION\fR]...
.SH DESCRIPTION
.B git\-backup
.I creates
a backup commit
.I from
uncommited changes
.I inside
a separate branch
&
.I pushes it
to the remote.
To apply the created backup (stash), just use `git stash apply \fIbranch-name\fR`
.SH OPTIONS
.TP
.BR \-r " " \fIREMOTE\fR
change to which remote to push the backup branch to;
default=origin
.TP
.BR \-c " " \fICHAR_COUNT\fR
max number of characters for the branch name.
Your remote / git might complain that the branch name
is too long. You can limit it's length here;
default=255
.TP
.BR \-q
quiet mode. Print only the backup branches' name;
NOTE that you might get prompted for the passphrase/password to access the remote!
default=false
.TP
.BR \-l
local mode. Do NOT push the generated branch to remote;
default=false
.TP
.BR \-m
display the manual page (\fBgit-backup\fR(1)) and exit
.TP
.BR \-h
display the raw \fIhelp\fR and exit
.SH EXAMPLES
.PP
Creating a backup:
.nf
.RS
$ git\-backup
$ git\-backup \fB-lq\fR
$ git\-backup \fB-r\fI upstream\fB -c\fI 128\fR
.RE
.fi
.PP
.PP
Applying the backup:
.nf
.RS
$ git stash apply \fIbranch\-name\fR
$ git stash apply \fI"wip/sarpik/1572101955--f843bc9--WIP-on-master-87231dd-Merge-branch-feature-better-branch-names"\fR
.RE
.fi
.PP
.SH NOTES
.P
Since `git stash` is used, the files that you've added to the `index` will be unstaged.
This is NOT dangerious - you do NOT lose your files, ever.
You should only care if you've spent a lot of time adding files to the `index` and haven't commited yet.
.SH BUGS
If you find issues, please report them:
.UR https://github.com/sarpik/git-backup/issues
https://github.com/sarpik/git-backup/issues
.UE
.SH AUTHOR
Kipras Melnikovas \fIhttps://kipras.org/\fR :: sarpik \fIhttps://github.com/sarpik/\fR :: kipras@kipras.org
.SH SEE ALSO
.BR git (1),
.BR git\-remote (1),
.BR git\-stash (1),
.BR git\-branch (1),
.BR git\-push (1)
.I https://github.com/sarpik/git-backup/