-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
409600f
commit eb37b2d
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,21 @@ a command like this: | |
```console | ||
$ git push -v [email protected]:NixOS/nixpkgs.git HEAD | ||
``` | ||
|
||
You can also explicitly set the `pushRemote` for a single branch. This will | ||
allow you to directly push that given branch (but no other branches). The | ||
easiest way to set this up is directly through the `.git/config` file. Add an | ||
entry for the branch that looks similar to the following: | ||
|
||
```console | ||
$ cat .git/config | ||
... | ||
[branch "haskell-updates"] | ||
remote = origin | ||
pushRemote = [email protected]:NixOS/nixpkgs.git | ||
merge = refs/heads/haskell-updates | ||
... | ||
``` | ||
|
||
This makes it so that when the `haskell-updates` branch is checked out, you can | ||
run `git push` and it automatically pushes to `[email protected]:NixOS/nixpkgs.git`. |