Push git alias to remote repo

danielrvt

Is it possible to push a git alias to a git repo so everyone that clones that repo can use that alias?

Example:

git config alias.st "status -s"
git push

Does the alias gets pushed?

PD: What I want to achieve is something to develop a several steps tutorial, so whenever I do "next" or "git next" it switches to the branch of the next level.

jub0bs

An alias is part of your local (system-level, user-level, or repo-level) config. Because you cannot share your local config via git push, you cannot push an alias to a remote.

There is a good security reason for such a restriction: imagine if aliases got copied to the local config of anyone who cloned your repo and you had defined an alias equivalent to sudo rm -rf /, encouraging people to use it. Mayhem would ensue...

What you can always do, however, if you want to share the definition of your alias with other people, is to push a commit that contains a text file with the definition of your alias in it.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Push local Git repo to new remote including all branches and tags

From Java

Git push existing repo to a new and different remote repo server?

From Dev

Why does Git show my local "pull from remote" when I push my commit to the remote repo?

From Dev

feasibility of git without a remote repo

From Dev

Git remote repo, not showing the files

From Dev

Create new repo by 'git remote add origin' and 'push'

From Dev

Git - Push current Heroku repo to a remote github repo

From Dev

Cannot push git repo to Dokku remote on Digital Ocean droplet?

From Dev

Failure to push to remote repo in Git

From Dev

Error Pushing to Remote Git Repo

From Dev

Force a certain version of git on push to remote repo

From Dev

git push cloned repo to own repo

From Dev

Push local new Git repo to existing remote repo as branch?

From Dev

How can I create a bash or zsh alias for git commit, git pull, git push and pull on a remote server?

From Dev

Git clone remote repo into another remote repo

From Dev

How can I push a git repo to a remote server through ssh?

From Dev

feasibility of git without a remote repo

From Dev

Git remote repo, not showing the files

From Dev

Can I add a file to my local Git repo but not push it to remote

From Dev

push new git branch to remote repo on eclipse

From Dev

Git - Push current Heroku repo to a remote github repo

From Dev

git sparseCheckout repo pushes full repo to remote

From Dev

Git remote repo no showing in <ul>

From Dev

Cannot push to remote git repo from one machine to another in LAN

From Dev

How can I push a git repo to a remote server through ssh?

From Dev

unable to push my local git repo to the remote repo

From Dev

Working with remote repo git

From Dev

git push to remote repo, but seems nothing is uploaded on repo

From Dev

Can the Spring Cloud Config Server also push config updates to the remote git repo?

Related Related

  1. 1

    Push local Git repo to new remote including all branches and tags

  2. 2

    Git push existing repo to a new and different remote repo server?

  3. 3

    Why does Git show my local "pull from remote" when I push my commit to the remote repo?

  4. 4

    feasibility of git without a remote repo

  5. 5

    Git remote repo, not showing the files

  6. 6

    Create new repo by 'git remote add origin' and 'push'

  7. 7

    Git - Push current Heroku repo to a remote github repo

  8. 8

    Cannot push git repo to Dokku remote on Digital Ocean droplet?

  9. 9

    Failure to push to remote repo in Git

  10. 10

    Error Pushing to Remote Git Repo

  11. 11

    Force a certain version of git on push to remote repo

  12. 12

    git push cloned repo to own repo

  13. 13

    Push local new Git repo to existing remote repo as branch?

  14. 14

    How can I create a bash or zsh alias for git commit, git pull, git push and pull on a remote server?

  15. 15

    Git clone remote repo into another remote repo

  16. 16

    How can I push a git repo to a remote server through ssh?

  17. 17

    feasibility of git without a remote repo

  18. 18

    Git remote repo, not showing the files

  19. 19

    Can I add a file to my local Git repo but not push it to remote

  20. 20

    push new git branch to remote repo on eclipse

  21. 21

    Git - Push current Heroku repo to a remote github repo

  22. 22

    git sparseCheckout repo pushes full repo to remote

  23. 23

    Git remote repo no showing in <ul>

  24. 24

    Cannot push to remote git repo from one machine to another in LAN

  25. 25

    How can I push a git repo to a remote server through ssh?

  26. 26

    unable to push my local git repo to the remote repo

  27. 27

    Working with remote repo git

  28. 28

    git push to remote repo, but seems nothing is uploaded on repo

  29. 29

    Can the Spring Cloud Config Server also push config updates to the remote git repo?

HotTag

Archive