Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Git ########################################################################
- GIT_NAME="name";
- GIT_EMAIL="mail@domain.com";
- # Configure my git repository
- mygit()
- {
- git config user.name $GIT_NAME;
- git config user.email $GIT_EMAIL;
- getgit;
- }
- # Configure git repository
- setgit()
- {
- if [ -n "$1" ] && [ -n "$2" ]
- then
- git user.name $1;
- git config user.email $2;
- getgit;
- else
- echo -e "\033[31mUsage: setgit username useremail";
- fi
- }
- # Display git repository configuration
- getgit()
- {
- echo -e "\033[32mname: \033[0m`git config user.name`";
- echo -e "\033[32memail: \033[0m`git config user.email`";
- }
- ################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement