Git commit from within a Makefile

Richard

I have a Makefile for a Latex project I'm working on. Makefiles aren't my forte, but is there a way to do something like:

make git "My comment"

And have the makefile execute:

git commit -m "My comment"
git push origin master

?

Marco

You could use a variable and read it from within the Makefile. Example:

git:
    git commit -m "$m"

Then you can commit with: make git m="My comment".

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to open terminal editor from within `commit-msg` git hook

From Dev

(How) can I run git checkout from within the pre-commit hook?

From Dev

get commit id from commit message git

From Dev

Get Git commit hash from commit message

From Dev

git replace a commit by a commit from another branch

From Java

Remove files from Git commit

From Dev

Removing commit from git history

From Dev

Git - unlink commit from tag?

From Dev

Git - Remove commit from history

From Dev

Removing a git commit from history

From Dev

Git continue from a commit id

From Dev

In a Makefile, how can I fetch and assign a git commit hash to a variable?

From Dev

Can't access files from within makefile

From Dev

imitate "make -j" from within the Makefile

From Dev

Move some changes from a Git commit into a separate commit

From Dev

git pick commit from another branch and put it under current commit

From Dev

Determine which computer a git commit came from

From Dev

clone from a git repo and commit to a new repository

From Dev

Run `git commit` from another directory

From Dev

how to pull out a commit from git history?

From Java

Branch from a previous commit using Git

From Java

Finding what branch a Git commit came from

From Dev

Git - restore a deleted folder from previous commit

From Java

git remove merge commit from history

From Dev

Move specific git commit from master to branch

From Java

Can't remove file from git commit

From Dev

TortoiseGit Git Commit message from script

From Dev

git remove a commit from pull request

From Dev

Allow access to git repository from a certain commit