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 Dev

Failure to push to remote repo in Git

From Dev

Force a certain version of git on push to remote repo

From Dev

push new git branch to remote repo on eclipse

From Java

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

From Dev

Git - Push current Heroku repo to a remote github repo

From Dev

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

From Dev

Git - Push current Heroku repo to a remote github repo

From Dev

unable to push my local git repo to the remote repo

From Dev

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

From Dev

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

From Java

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

From Dev

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

From Dev

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

From Dev

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

From Dev

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

From Dev

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

From Dev

Working with remote repo git

From Dev

Git clone remote repo into another remote repo

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

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

From Dev

git sparseCheckout repo pushes full repo to remote

From Dev

git push cloned repo to own repo

From Dev

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

From Dev

Git remote repo, not showing the files

From Dev

feasibility of git without a remote repo

From Dev

Error Pushing to Remote Git Repo

From Dev

Git remote repo, not showing the files

From Dev

feasibility of git without a remote repo

From Dev

Git remote repo no showing in <ul>

Related Related

  1. 1

    Failure to push to remote repo in Git

  2. 2

    Force a certain version of git on push to remote repo

  3. 3

    push new git branch to remote repo on eclipse

  4. 4

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

  5. 5

    Git - Push current Heroku repo to a remote github repo

  6. 6

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

  7. 7

    Git - Push current Heroku repo to a remote github repo

  8. 8

    unable to push my local git repo to the remote repo

  9. 9

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

  10. 10

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

  11. 11

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

  12. 12

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

  13. 13

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

  14. 14

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

  15. 15

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

  16. 16

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

  17. 17

    Working with remote repo git

  18. 18

    Git clone remote repo into another remote repo

  19. 19

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

  20. 20

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

  21. 21

    git sparseCheckout repo pushes full repo to remote

  22. 22

    git push cloned repo to own repo

  23. 23

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

  24. 24

    Git remote repo, not showing the files

  25. 25

    feasibility of git without a remote repo

  26. 26

    Error Pushing to Remote Git Repo

  27. 27

    Git remote repo, not showing the files

  28. 28

    feasibility of git without a remote repo

  29. 29

    Git remote repo no showing in <ul>

HotTag

Archive