DEV Community

Arthur Kyagulanyi
Arthur Kyagulanyi

Posted on

1 3

Script to check git status, add files, commit and push.

The process of adding and pushing files with git may tend to be boring and repetitive.
Do less with one script, check git status, add files to staging area, commit the staged files with a message, and push with "gscp" script.

How to use the script

Step 1. Download the script from the github repo.

Link To Repo
git clone https://github.com/kyagie/gscp.git

Step 2. Paste the script in the a folder called bin in your user directory.

If you do not have this folder, create it in the /home/{user} directory, with mkdir bin. And paste the script here.

You should end up with something like this /home/arthur/bin/gscp

Step 3. Change permissions on the file.

chmod 755 gscp

The script is now ready for use globally

If you found this helpful, you can support me by buying a coffee Buy Me A Coffee
Thank You

Top comments (1)

Collapse
 
brinkerhof79610 profile image
Brinkerhoffson Felipe

Automating Git operations can save time and reduce repetitive tasks, making workflow management smoother. The gscp script simplifies the process by checking Git status, adding files, committing with a message, and pushing changes—all in one command. To use it, simply clone the repository, place the script in the bin folder within your user directory, and update file permissions. Once set up, you can execute Git commands globally with ease. If you're interested in more automation tools, for Script ML Free Check This Out to explore additional resources that can enhance your workflow.