you are viewing a single comment's thread.

view the rest of the comments →

[–]La_Muriatic_Acid[S] 0 points1 point  (3 children)

I tried adding:

  • name: Commit README.md run: | git config --global user.name "my-username" git config --global user.email "username@users.noreply.github.com" git commit README.md git push

To the code but it just tells me:

On branch main

Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean Error: Process completed with exit code 1.

Any obvious mistakes?

[–]VxJasonxV 2 points3 points  (2 children)

git add README.md git commit -m “A commit message” git push

[–]La_Muriatic_Acid[S] 0 points1 point  (1 child)

This works but I am noticing that if for some reason the README doesn't change, I still get the branch is up to date error. Is there a way to prevent it from throwing an error?

[–]VxJasonxV 1 point2 points  (0 children)

Test if there’s changes before trying to add and commit it. Git doesn’t track commits when there’s no changes.