Skip to content
This repository was archived by the owner on Jul 31, 2019. It is now read-only.

MaikMike/Tweet-My-Commits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tweet My Commits

Git hook setup for Tweet my commits

Installing Twurl

Twurl can be installed using ruby gems:

gem install twurl

Getting Started

If you haven't already, the first thing to do is apply for a developer account to access Twitter APIs:

https://developer.twitter.com/en/apply-for-access

After you have that access you can create a Twitter app and generate a consumer key and secret.

Just copy the consumer key and secret in the .bashrc file.

open the .bashrc file:

vim ~/.bashrc

copy the consumer key and secret:

export TWITTER_CONSUMER_KEY=your_consumer_key_here
export TWITTER_CONSUMER_SECRET=your_consumer_secret_here

reload env variables:

source ~/.bashrc

execute the pre-authorize script:

sh pre-authorize.sh

This will return an URL that you should open up in your browser. Authenticate to Twitter, and then enter the returned PIN back into the terminal. Assuming all that works well, you will be authorized to make requests with the API. Twurl will tell you as much.

Now just copy the post-commit script and paste itinto .git/hook/ of any project.

cp post-commit ~/my-awesome-git-project/.git/hooks/post-commit

About

Git hook setup for Tweet my commits

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages