Simple Bash Script to Commit and Push to Git

Blog Post

A quick git bash script for you guys!

If you are like me and value simplicity and hate remembering stuff then this simple git bash script to commit and push your code to both local and remote git repositories is for you. I am using GitLab to host my remote repository.

Setting Up a Local git Repository and Pushing it to a Remote Repository

git init
git add -A
git commit -m "first commit"
git remote add origin git@***your repository***
git push -u origin master

git bash script

Now, simply save the below script in a file called commit.bash, making sure to change the first line to point to where your code lives.

#!/bin/bash

cd /Users/alex/Documents/DEV
git add -A
if [ $# -eq 0 ]
then
  git commit -m "nothing to see here"
else
  git commit -m "$*"
fi
git status
git push origin master

Then add executable permissions the saved file:

chmod +x commit.bash

Then hack away with your code. When you are ready to commit and push your code to git simply run your git bash script!

./commit.bash cool stuff

Happy coding!

Coders are Commanding Starting Salaries Between £20K to £40K in London

Blog Post

Experienced coders can earn well over £100K per year.

Developers are in high demand in London and indeed the world over. The time is ripe to get involved in this exciting and growing sector.

Whether you want to build a successful career as a developer, work flexibly as a freelancer or have aspirations to build the next killer app, our online learning resources will help you in starting that rewarding journey!

Welcome to the Learn To Code London Blog!

News Update

Being able to code has become a hugely advantageous skill to have.

Software is now embedded in the very fabric of modern life. It’s in our cars, mobile phones and now even clothing. This trend will only continue to escalate. If you think it’s not for you, then think again.

Bloomberg Businessweek recently even dedicated a whole issue to it in June 2015.

Software has been around since the 1940s. Which means that people have been faking their way through meetings about software, and the code that builds it, for generations. Now that software lives in our pockets, runs our cars and homes, and dominates our waking lives, ignorance is no longer acceptable. The world belongs to people who code. Those who don’t understand will be left behind.

– Paul Ford

We offer great resources to get you started on a new path as a programmer. Check our main site for and start learning to code today!