Skip to content
This repository was archived by the owner on Jun 10, 2022. It is now read-only.

Commit f227a8e

Browse files
committed
fix(commands): Add new commands
BREAKING CHANGE: Reorder Commands
1 parent 99d89b0 commit f227a8e

File tree

2 files changed

+80
-47
lines changed

2 files changed

+80
-47
lines changed

docs/docs.md

+58-33
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,31 @@
66
- [Commit All...](#commit-all)
77
- [Commit Staged...](#commit-staged)
88
- [Stage Changes](#stage-changes)
9+
- [Add To Last Commit](#add-to-last-commit)
10+
- [Undo Last Commit](#undo-last-commit)
911
- [Discard Changes](#discard-changes)
1012
- [Discard All Changes](#discard-all-changes)
1113
- [Ignore Changes](#ignore-changes)
1214
- [Unignore Changes](#unignore-changes)
1315
- [Stash Changes](#stash-changes)
1416
- [Unstash Changes](#unstash-changes)
15-
- [Add To Last Commit](#add-to-last-commit)
16-
- [Undo Last Commit](#undo-last-commit)
17-
- [Switch Branch](#switch-branch)
18-
- [Create Branch](#create-branch)
19-
- [Merge Branch](#merge-branch)
17+
- [Fetch](#fetch)
18+
- [Fetch All](#fetch-all)
2019
- [Pull](#pull)
20+
- [Pull All](#pull-all)
2121
- [Push](#push)
22+
- [Push All](#push-all)
2223
- [Sync](#sync)
24+
- [Sync All](#sync-all)
25+
- [Merge Branch](#merge-branch)
26+
- [Switch Branch](#switch-branch)
27+
- [Create Branch](#create-branch)
28+
- [Delete Branch](#delete-branch)
2329
- [Initialize](#initialize)
24-
- [Refresh](#refresh)
25-
- [Fetch](#fetch)
26-
- [Run Command](#run-command)
2730
- [Log](#log)
2831
- [Diff](#diff)
32+
- [Run Command](#run-command)
33+
- [Refresh](#refresh)
2934

3035
## Commit...
3136

@@ -52,6 +57,16 @@ Same as [Commit...](#commit) but will list only staged changes in the dialog.
5257

5358
Stage changes for committing later.
5459

60+
## Add To Last Commit
61+
62+
This will add the selected files to the last commit.
63+
64+
If you want to change the message of the last commit you will have to choose [Commit...](#commit) or [Commit All...](#commit-all).
65+
66+
## Undo Last Commit
67+
68+
This will undo the last commit but save the changes. Like `git reset --mixed HEAD~1`.
69+
5570
## Discard Changes
5671

5772
This will discard changes to the selected files.
@@ -76,55 +91,57 @@ Save changes and checkout last commit.
7691

7792
Restore changes from last stash.
7893

79-
## Add To Last Commit
94+
## Fetch
8095

81-
This will add the selected files to the last commit.
96+
Fetch from all tracked repos.
8297

83-
If you want to change the message of the last commit you will have to choose [Commit...](#commit) or [Commit All...](#commit-all).
98+
## Fetch All
8499

85-
## Undo Last Commit
100+
Fetch all project repos.
86101

87-
This will undo the last commit but save the changes. Like `git reset --mixed HEAD~1`.
102+
## Pull
88103

89-
## Switch Branch
104+
Pull from tracked upstream.
90105

91-
Checkout a different branch in this repo.
106+
## Pull All
92107

93-
## Create Branch
108+
Pull all project repos.
94109

95-
Create a branch and optionally track/create a remote branch.
110+
## Push
96111

97-
## Merge Branch
112+
Push to tracked upstream.
98113

99-
Merge or rebase a branch.
114+
## Push All
100115

101-
## Pull
116+
Push all project repos.
102117

103-
Pull from tracked upstream.
118+
## Sync
104119

105-
## Push
120+
Pull then Push.
106121

107-
Push to tracked upstream.
122+
## Sync All
108123

109-
## Sync
124+
Pull then Push all project repos.
110125

111-
Pull then Push.
126+
## Merge Branch
112127

113-
## Initialize
128+
Merge or rebase a branch.
114129

115-
Initialize a git repo for the current project.
130+
## Switch Branch
116131

117-
## Refresh
132+
Checkout a different branch in this repo.
118133

119-
Refresh the git status in Atom.
134+
## Create Branch
120135

121-
## Fetch
136+
Create a branch and optionally track/create a remote branch.
122137

123-
Fetch from all tracked repos.
138+
## Delete Branch
124139

125-
## Run Command
140+
Delete a local and/or remote branch.
126141

127-
Run any `git` command with selected `%files%` as an argument.
142+
## Initialize
143+
144+
Initialize a git repo for the current project.
128145

129146
## Log
130147

@@ -133,3 +150,11 @@ Show the git log.
133150
## Diff
134151

135152
Open the diff patch in a new editor.
153+
154+
## Run Command
155+
156+
Run any `git` command with selected `%files%` as an argument.
157+
158+
## Refresh
159+
160+
Refresh the git status in Atom.

lib/commands.js

+22-14
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,27 @@ import addToLastCommit from "./commands/add-to-last-commit";
88
import undoLastCommit from "./commands/undo-last-commit";
99
import discardChanges from "./commands/discard-changes";
1010
import discardAllChanges from "./commands/discard-all-changes";
11+
import ignoreChanges from "./commands/ignore-changes";
12+
import unignoreChanges from "./commands/unignore-changes";
13+
import stashChanges from "./commands/stash-changes";
14+
import unstashChanges from "./commands/unstash-changes";
15+
import fetch from "./commands/fetch";
16+
import fetchAll from "./commands/fetch-all";
1117
import pull from "./commands/pull";
18+
import pullAll from "./commands/pull-all";
1219
import push from "./commands/push";
20+
import pushAll from "./commands/push-all";
1321
import sync from "./commands/sync";
22+
import syncAll from "./commands/sync-all";
1423
import mergeBranch from "./commands/merge-branch";
1524
import switchBranch from "./commands/switch-branch";
1625
import createBranch from "./commands/create-branch";
1726
import deleteBranch from "./commands/delete-branch";
18-
import ignoreChanges from "./commands/ignore-changes";
19-
import unignoreChanges from "./commands/unignore-changes";
2027
import init from "./commands/init";
21-
import refresh from "./commands/refresh";
22-
import fetch from "./commands/fetch";
23-
import stashChanges from "./commands/stash-changes";
24-
import unstashChanges from "./commands/unstash-changes";
25-
import runCommand from "./commands/run-command";
2628
import log from "./commands/log";
2729
import diff from "./commands/diff";
30+
import runCommand from "./commands/run-command";
31+
import refresh from "./commands/refresh";
2832

2933
/**
3034
* These commands will be added to the context menu in the order they appear here.
@@ -54,21 +58,25 @@ export default {
5458
"undo-last-commit": undoLastCommit,
5559
"discard-changes": discardChanges,
5660
"discard-all-changes": discardAllChanges,
61+
"ignore-changes": ignoreChanges,
62+
"unignore-changes": unignoreChanges,
63+
"stash-changes": stashChanges,
64+
"unstash-changes": unstashChanges,
65+
"fetch": fetch,
66+
"fetch-all": fetchAll,
5767
"pull": pull,
68+
"pull-all": pullAll,
5869
"push": push,
70+
"push-all": pushAll,
5971
"sync": sync,
72+
"sync-all": syncAll,
6073
"merge-branch": mergeBranch,
6174
"switch-branch": switchBranch,
6275
"create-branch": createBranch,
6376
"delete-branch": deleteBranch,
64-
"ignore-changes": ignoreChanges,
65-
"unignore-changes": unignoreChanges,
6677
"init": init,
67-
"refresh": refresh,
68-
"fetch": fetch,
69-
"stash-changes": stashChanges,
70-
"unstash-changes": unstashChanges,
71-
"run-command": runCommand,
7278
"log": log,
7379
"diff": diff,
80+
"run-command": runCommand,
81+
"refresh": refresh,
7482
};

0 commit comments

Comments
 (0)