jGit Push not always visible in GitHub Activity page

24 Views Asked by At

I use jGit to manage repositories, and I have a question related to push().

The issue: not all pushes are visible in the GitHub activity page. In the workflow below, Ben is pushing a change to GitHub without doing a pull before. His changes won't be visible in the GitHub activity pane.

Rob Ben
Modifies file sakila.txt adding a 'Rob' line
Stages the file sakila.txt
commits the changes CRob
push to origin
CRob is visible in GitHub activity
Modifies sakila.txt adding a 'Ben' line
Stages the file sakila.txt
commits the changes CBen
Pushes to origin CBen
CBen is not visible in GitHub activity

Staging

git.add().addFilepattern('sakila.txt').call();

Commiting I do a fetch first

git.fetch().setRemote("origin").call();

git.commit().setMessage(...).setAuthor(...).call();

Push

git.push().setRemote("origin").call();

0

There are 0 best solutions below