New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

git_aliases

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git_aliases - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

vim.exe.stackdump

24

index.js

@@ -5,15 +5,31 @@ const { execSync } = require('child_process')

co: 'checkout',
cb: `"checkout -b"`,
ca: `"checkout -a"`,
br: 'branch',
ci: 'commit',
st: 'status',
st: `"status -s"`,
ft: 'fetch',
pl: 'pull',
ps: 'push'
ps: 'push',
ad: 'add .',
cm: `"commit -m"`,
in: 'init',
lg: `"log --pretty='> %Cred%h %Creset| %Cgreen"%s"%Creset | %Cblue%an%Creset - %ar' -10"`,
rv: `"remote -v"`,
df: 'diff'
}
function execCmd (alias, to) {
console.log('Executing', `"${alias}" ~> "${to}"`)
execSync(['git', 'config', '--global', 'alias.' + alias, to].join(' '))
console.log('Executing', `${alias} ~> ${to}..`)
execSync(['git', 'config', '--global', `alias.${alias}`, to].join(' '))
}
console.log()
console.log('Clearing alias section..')
try {
execSync(['git', 'config', '--global', '--remove-section', 'alias'].join(' '))
} catch (error) {}
console.log()
for (let alias in to) {

@@ -20,0 +36,0 @@ execCmd(alias, to[alias])

4

package.json
{
"name": "git_aliases",
"version": "1.0.2",
"version": "1.1.0",
"description": "Create aliases for git commands",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "standard",
"build": "pkg index.js --target node8-linux-x64,node8-macos-x64,node8-win-x64 --output output/git_aliases",

@@ -9,0 +9,0 @@ "postinstall": "node index.js"

@@ -0,1 +1,3 @@

[![NPM](https://nodei.co/npm/git_aliases.png)](https://nodei.co/npm/git_aliases/)
# git_aliases

@@ -5,9 +7,17 @@ Create aliases for git commands:

```
"co" ~> "checkout"
"br" ~> "branch"
"ci" ~> "commit"
"st" ~> "status"
"ft" ~> "fetch"
"pl" ~> "pull"
"ps" ~> "push"
co ~> checkout
cb ~> "checkout -b"
ca ~> "checkout -a"
br ~> branch
ci ~> commit
st ~> "status -s"
ft ~> fetch
pl ~> pull
ps ~> push
ad ~> add .
cm ~> "commit -m"
in ~> init
lg ~> "log --pretty='> %Cred%h %Creset| %Cgreen"%s"%Creset | %Cblue%an%Creset - %ar' -10"
rv ~> "remote -v"
df ~> diff
```

@@ -19,2 +29,2 @@

`npm i git_aliases`
`npm i -g git_aliases`
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc