add g push!
This commit is contained in:
parent
231010fa79
commit
99330b94be
3 changed files with 9 additions and 0 deletions
|
|
@ -83,6 +83,7 @@ g clone *PATH* | git clone --recurse-submodules [-b *branch*] *PATH* <ul><li> Pa
|
|||
g fetch | Fetches all remotes and fast-forwards local branches when possible
|
||||
g fetch *branches* | Fetches and fast-forwards the specified branches
|
||||
g push | pushes to upstream. <ul><li> If upstream not set, prompt user to name a remote branch. </li> <li> If multiple remotes exist, prompt for which remote to use. </li></ul>
|
||||
g push! | git push --force-with-lease
|
||||
g remote | Interactive prompt to add a remote.
|
||||
g ff | git pull --ff-only
|
||||
g fff | deletes the local branch and rechecks it out (useful when remote branch has been force-pushed and can't be fast-forwarded)
|
||||
|
|
@ -112,6 +113,7 @@ g ! | g commit
|
|||
g @ | g branch
|
||||
g # | g tag
|
||||
g ^ | g push
|
||||
g ^^ | g push!
|
||||
|
||||
|
||||
### Why?
|
||||
|
|
|
|||
5
bin/g
5
bin/g
|
|
@ -416,6 +416,11 @@ else
|
|||
fi
|
||||
;;
|
||||
|
||||
^^ | push!)
|
||||
echo 'Force push with lease'
|
||||
git push --force-with-lease
|
||||
;;
|
||||
|
||||
remote)
|
||||
read -ep "What is the URL for this remote repo?: " remote_url
|
||||
read -ep "Choose an alias for this remote [origin]: " remote_alias
|
||||
|
|
|
|||
2
bin/g^^
Executable file
2
bin/g^^
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
g ^^ "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue