git-up 0.5.9 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +10 -7
- data/lib/git-up.rb +29 -2
- data/lib/git-up/version.rb +1 -1
- data/man/git-up.1 +99 -0
- metadata +2 -1
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
git-up
|
2
|
-
|
1
|
+
git-up(1) -- fetch and rebase all locally-tracked remote branches
|
2
|
+
=================================================================
|
3
|
+
|
4
|
+
SYNOPSIS
|
5
|
+
--------
|
3
6
|
|
4
7
|
`git pull` has two problems:
|
5
8
|
|
@@ -8,24 +11,24 @@ git-up
|
|
8
11
|
|
9
12
|
Solve them once and for all.
|
10
13
|
|
11
|
-
|
14
|
+
INSTALL
|
12
15
|
-------
|
13
16
|
|
14
17
|
$ gem install git-up
|
15
18
|
|
16
19
|
Windows support is predictably absent. Try the [Python port](https://github.com/msiemens/PyGitUp), which was started for that reason.
|
17
20
|
|
18
|
-
|
21
|
+
USE
|
19
22
|
---
|
20
23
|
|
21
24
|

|
22
25
|
|
23
|
-
|
26
|
+
ALTHOUGH
|
24
27
|
--------
|
25
28
|
|
26
29
|
`git-up` might mess up your branches, or set your chest hair on fire, or be racist to your cat, I don't know. It works for me.
|
27
30
|
|
28
|
-
|
31
|
+
DIFFICULTIES
|
29
32
|
------------
|
30
33
|
|
31
34
|
### Windows
|
@@ -35,7 +38,7 @@ Windows support is an ongoing pain. Have a look at [this ticket](https://github.
|
|
35
38
|
|
36
39
|
If you're using RVM and you get this error, [read this](https://github.com/aanand/git-up/blob/master/RVM.md).
|
37
40
|
|
38
|
-
|
41
|
+
CONFIGURATION
|
39
42
|
-------------
|
40
43
|
|
41
44
|
`git-up` has a few configuration options, which use git's configuration system. Each can be set either globally or per-project. To set an option globally, append the `--global` flag to `git config`, which you can run anywhere:
|
data/lib/git-up.rb
CHANGED
@@ -39,14 +39,41 @@ Fetch and rebase all remotely-tracked branches.
|
|
39
39
|
production #{"up to date".green}
|
40
40
|
|
41
41
|
There are no command-line options, but there are a few
|
42
|
-
`git config` variables you can set
|
43
|
-
|
42
|
+
`git config` variables you can set. For info on those
|
43
|
+
and more, check out the man page:
|
44
|
+
|
45
|
+
$ git up man
|
46
|
+
|
47
|
+
Or install it to your system, so you can get to it with
|
48
|
+
`man git-up` or `git help up`:
|
49
|
+
|
50
|
+
$ git up install-man
|
44
51
|
|
45
52
|
BANNER
|
46
53
|
|
54
|
+
man_path = File.expand_path('../../man/git-up.1', __FILE__)
|
55
|
+
|
47
56
|
case argv
|
48
57
|
when []
|
49
58
|
return
|
59
|
+
when ["man"]
|
60
|
+
system "man", man_path
|
61
|
+
exit
|
62
|
+
when ["install-man"]
|
63
|
+
destination = "/usr/local/share/man"
|
64
|
+
print "Destination to install man page to [#{destination}]: "
|
65
|
+
override = $stdin.gets.strip
|
66
|
+
destination = override if override.length > 0
|
67
|
+
|
68
|
+
dest_dir = File.join(destination, "man1")
|
69
|
+
dest_path = File.join(dest_dir, File.basename(man_path))
|
70
|
+
|
71
|
+
exit(1) unless system "mkdir", "-p", dest_dir
|
72
|
+
exit(1) unless system "cp", man_path, dest_path
|
73
|
+
|
74
|
+
puts "Installed to #{dest_path}"
|
75
|
+
|
76
|
+
exit
|
50
77
|
when ["-h"], ["--help"]
|
51
78
|
$stderr.puts(banner)
|
52
79
|
exit
|
data/lib/git-up/version.rb
CHANGED
data/man/git-up.1
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "GIT\-UP" "1" "July 2013" "" ""
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBgit\-up\fR \- fetch and rebase all locally\-tracked remote branches
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBgit pull\fR has two problems:
|
11
|
+
.
|
12
|
+
.IP "\(bu" 4
|
13
|
+
It merges upstream changes by default, when it\'s really more polite to rebase over them \fIhttp://www\.gitready\.com/advanced/2009/02/11/pull\-with\-rebase\.html\fR, unless your collaborators enjoy a commit graph that looks like bedhead\.
|
14
|
+
.
|
15
|
+
.IP "\(bu" 4
|
16
|
+
It only updates the branch you\'re currently on, which means \fBgit push\fR will shout at you for being behind on branches you don\'t particularly care about right now\.
|
17
|
+
.
|
18
|
+
.IP "" 0
|
19
|
+
.
|
20
|
+
.P
|
21
|
+
Solve them once and for all\.
|
22
|
+
.
|
23
|
+
.SH "INSTALL"
|
24
|
+
.
|
25
|
+
.nf
|
26
|
+
|
27
|
+
$ gem install git\-up
|
28
|
+
.
|
29
|
+
.fi
|
30
|
+
.
|
31
|
+
.P
|
32
|
+
Windows support is predictably absent\. Try the Python port \fIhttps://github\.com/msiemens/PyGitUp\fR, which was started for that reason\.
|
33
|
+
.
|
34
|
+
.SH "USE"
|
35
|
+
.
|
36
|
+
.nf
|
37
|
+
|
38
|
+
$ git up
|
39
|
+
.
|
40
|
+
.fi
|
41
|
+
.
|
42
|
+
.SH "ALTHOUGH"
|
43
|
+
\fBgit\-up\fR might mess up your branches, or set your chest hair on fire, or be racist to your cat, I don\'t know\. It works for me\.
|
44
|
+
.
|
45
|
+
.SH "DIFFICULTIES"
|
46
|
+
.
|
47
|
+
.SS "Windows"
|
48
|
+
Windows support is an ongoing pain\. Have a look at this ticket \fIhttps://github\.com/aanand/git\-up/issues/34\fR if you really need it, or if you\'re bored\.
|
49
|
+
.
|
50
|
+
.SS "spawn\.rb:187:in `_pspawn\': Invalid command name (ArgumentError)"
|
51
|
+
If you\'re using RVM and you get this error, read this \fIhttps://github\.com/aanand/git\-up/blob/master/RVM\.md\fR\.
|
52
|
+
.
|
53
|
+
.SH "CONFIGURATION"
|
54
|
+
\fBgit\-up\fR has a few configuration options, which use git\'s configuration system\. Each can be set either globally or per\-project\. To set an option globally, append the \fB\-\-global\fR flag to \fBgit config\fR, which you can run anywhere:
|
55
|
+
.
|
56
|
+
.IP "" 4
|
57
|
+
.
|
58
|
+
.nf
|
59
|
+
|
60
|
+
git config \-\-global git\-up\.bundler\.check true
|
61
|
+
.
|
62
|
+
.fi
|
63
|
+
.
|
64
|
+
.IP "" 0
|
65
|
+
.
|
66
|
+
.P
|
67
|
+
To set it within a project, run the command inside that project\'s directory and omit the \fB\-\-global\fR flag:
|
68
|
+
.
|
69
|
+
.IP "" 4
|
70
|
+
.
|
71
|
+
.nf
|
72
|
+
|
73
|
+
cd myproject
|
74
|
+
git config git\-up\.bundler\.check true
|
75
|
+
.
|
76
|
+
.fi
|
77
|
+
.
|
78
|
+
.IP "" 0
|
79
|
+
.
|
80
|
+
.SS "git\-up\.bundler\.check [true|false]"
|
81
|
+
Default: \fBfalse\fR\. If \fBtrue\fR, git\-up will check your app for any new bundled gems and suggest a \fBbundle install\fR if necessary\.
|
82
|
+
.
|
83
|
+
.SS "git\-up\.bundler\.autoinstall [true|false]"
|
84
|
+
Default: \fBfalse\fR\. If \fBtrue\fR, and if \fBgit\-up\.bundler\.check\fR is also set to \fBtrue\fR, git\-up will run \fBbundle install\fR for you if it finds missing gems\.
|
85
|
+
.
|
86
|
+
.SS "git\-up\.fetch\.prune [true|false]"
|
87
|
+
Default: \fBtrue\fR\. Append the \fB\-\-prune\fR flag when running \fBgit fetch\fR, if your git version supports it (1\.6\.6 or greater), telling it to remove any remote tracking branches which no longer exist on the remote \fIhttp://linux\.die\.net/man/1/git\-fetch\fR\.
|
88
|
+
.
|
89
|
+
.SS "git\-up\.fetch\.all [true|false]"
|
90
|
+
Default: \fBfalse\fR\. Normally, git\-up will only fetch remotes for which there is at least one local tracking branch\. Setting this option to \fBtrue\fR will make git\-up always fetch from all remotes, which is useful if e\.g\. you use a remote to push to your CI system but never check those branches out\.
|
91
|
+
.
|
92
|
+
.SS "git\-up\.rebase\.arguments [string]"
|
93
|
+
Default: \fBunset\fR\. Additional arguments to pass to \fBgit rebase\fR\. For example, setting this to \fB\-\-preserve\-merges\fR will recreate your merge commits in the rebased branch\.
|
94
|
+
.
|
95
|
+
.SS "git\-up\.rebase\.auto [true|false]"
|
96
|
+
Default: \fBtrue\fR\. If this option is set to \fBfalse\fR, git\-up will not rebase branches for you\. Instead, it will print a message saying they are diverged and let you handle rebasing them later\. This can be useful if you have a lot of in\-progress work that you don\'t want to deal with at once, but still want to update other branches\.
|
97
|
+
.
|
98
|
+
.SS "git\-up\.rebase\.log\-hook \"COMMAND\""
|
99
|
+
Default: \fBunset\fR\. Runs \fBCOMMAND\fR every time a branch is rebased or fast\-forwarded, with the old head as \fB$1\fR and the new head as \fB$2\fR\. This can be used to view logs or diffs of incoming changes\. For example: \fB\'echo "changes on $1:"; git log \-\-oneline \-\-decorate $1\.\.$2\'\fR
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-up
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- bin/git-up
|
75
75
|
- lib/git-up/version.rb
|
76
76
|
- lib/git-up.rb
|
77
|
+
- man/git-up.1
|
77
78
|
- LICENSE
|
78
79
|
- README.md
|
79
80
|
homepage: http://github.com/aanand/git-up
|