Skip to content

cincodemayo11/git-pusher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 

Repository files navigation

WHAT THIS SCRIPT DOES

This script adds (git add .), commits (git commit -m) and pushes (git push) your repos for you with minimal input.

Your input

An optional commit message. If you don't wish to input a custom commit message, a generic automessage will be entered.

PREP WORK

  1. Install expect, a small (<1mb) scripting language that's used to automate interactive applications. It is required for this script to work

    • Ubuntu/Debian :

    sudo apt-get install expect

    • Fedora/RHEL/CentOS:

    sudo dnf install expect or sudo yum install expect

    • Arch Linux:

    sudo pacman -S expect

    • openSUSE:

    sudo zypper install expect

  2. Clone this repo

    git clone https://github.com/cincodemayo11/git-pusher.git

  3. Navigate (cd) into the repo folder

  4. Run the installer

    sudo ./install

  5. Create an environment variable called GITUSER and enter your Github username as its value by following the following instructions:

    • Use a text editor of choice to open your .bashrc file.

    I will use Emacs as an example.

  • Open your shell start up file:

     emacs ~/.bashrc
    
  • at the bottom of the file, type:

     export GITUSER="your_username_here"
    
  1. Set your github password as variable GITPASS and enter your Github Personal Access Token as its value.
  • Open your shell start up file:

     emacs ~/.bashrc
    
  • at the bottom of the file, type:

     export GITPASS="your_PAT_here"
    

    Disclaimer: Don't omit the speech marks

    What if I don't have a .bashrc file? - Create one

  • Save and exit from the text editor.

  1. In the terminal, run source ~./bashrc to save and apply all changes.

TO PUSH

  1. Navigate (cd) into the folder you want to push.

  2. Run the program by simply running

    pu.sh

  3. Input commit message (or leave it empty to get an automessage) and press Enter.

You do not need to use speech marks or apostrophes when typing a commit message

  1. Pray to your God that this works

If you want to change username or password, simply go to your .bashrc file and change the GITPASS or GITUSER variables' contents to reflect the new changes.

Feel free to report any issues or ask any questions.

God bless all frogs and may they roam and croak the Earth

About

This script pushes your repos for you.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages