"Push an arbitrary branch or commit to gerrit. If you want to push a specific commit and not HEAD, you can use this function (also updated with magit-git-command-topdir as referred to in the comment): (defun magit-push-to-gerrit (source) And thats it Now I can use P m to push to gerrit. '("m" "Push to gerrit" magit-push-to-gerrit))Īnd that's it! Now I can use P m to push to gerrit. From the toolbar buttonâs options menu, you can configure whether to push or to pull first. A general rule to push into gerrit as DRAFT, branch master: git push origin :refs/drafts/master Share.Next, I added it to push menu: (transient-append-suffix 'magit-push "p" In SmartGitâs main window, the Synchronize command can be invoked as follows: from the menu via RemoteSynchronize, with the Synchronize toolbar button, and in the Repositories view via Synchronize in the repositoryâs context menu. git config -global credential.helper cache -timeout600. You can also set a timeout for the above setting. #Smartgit push to gerrit password#Save the username and password for a session (cache it) git config -global credential.helper cache. git config -global credential.helper store. (magit-git-command "push origin HEAD:refs/for/master" (magit-toplevel))) In case you are using the Tower Git client, you can create and manage multiple Committer Identities - one for work, one for side projects, one for Open Source. Make Git store the username and password and it will never ask for them. git push -v origin refs/heads/master:refs/heads/refs/for/master, which is treated by Gerrit as a request to push directly to that branch. I don't know of any "out-of-the-box" way to do this however, you can expand magit to fit your needs.įirstly, I wrote a function that would push to gerrit: (defun magit-push-to-gerrit () After a while I managed to have enough time to try to fix it myself.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |