Bash: aliases to sync Git repos with GitHub and Bitbucket.
This commit is contained in:
		| @@ -133,4 +133,20 @@ function yay() { | ||||
| 		echo -n "$url" | pbcopy | ||||
| 		echo "URL copied to clipboard." | ||||
| 	fi | ||||
| } | ||||
| } | ||||
|  | ||||
| # Setup syncronization of current Git repo with GitHub repo of the same name | ||||
| function git-github() { | ||||
| 	user="sapegin" | ||||
| 	repo=`basename "$(pwd)"` | ||||
| 	git remote add origin "git@github.com:$user/$repo.git" | ||||
| 	git push -u origin master | ||||
| } | ||||
|  | ||||
| # Setup syncronization of current Git repo with Bitbucket repo of the same name | ||||
| function git-bitbucket() { | ||||
| 	user="sapegin" | ||||
| 	repo=`basename "$(pwd)"` | ||||
| 	git remote add origin "https://$user@bitbucket.org/$user/$repo.git" | ||||
| 	git push -u origin master | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Artem Sapegin
					Artem Sapegin