Question

I'm trying to implement an automatic Git push functionality on a ReviewBoard server. However, I believe that from the perspective of the ReviewBoard server, it would only be able to see the diff associated with that git commit and the git user [possibly other meta data associated with the commit <--- correct me if I'm wrong :)].

My question:

Does git provide the functionality to be able to make a push based on providing a diff?

Can git pushes be made under other users in Git?

Was it helpful?

Solution

Can git pushes be made under other users in Git?

I assume you are asking whether it is possible to git push commits made by one user while logged in as another user. In that case, yes it is possible. Git servers do not normally pose any such restrictions (though they can, e.g. in a git hook).

Does git provide the functionality to be able to make a push based on providing a diff?

Again I'm not exactly sure what you are asking. But if you have a diff, you can create a commit based on that diff, and then you can push it. You can use unix patch, git apply or git am. Example:

git apply file-with-diff.patch
git commit -m "patched"
git push
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top