Bored of writing the same line of code over and over again to commit then try out the below method for Linux to make it easier to commit.
Git Add, commit and push all in one Linux script
- Create a new file “gitadd.sh”.
( mine is under git folder, Full path with file : ~/git/gitadd.sh ) - Copy the code below in the file “gitadd.sh”
3. Change the default branch name to your’s so you don’t have to change branch too
name=${name:-“your_default_branch_name”}
3. Run the script
OR for shortning the command
3. Create your alias in file “.bashrc”
Replace the path of file where you place your file from “~git/gitadd.sh” to “your path”
Run the new command