Home push to git from vba on windows
Reply: 0

push to git from vba on windows

skatun
1#
skatun Published in 2017-12-07 12:26:05Z

I am developing word and excel macros, however to keep revision control and track changes I would like to use GitLab

So what I have done so far is to have a code which export out all vba code to a folder on my PC(Z:/Dokumentstyring/GIT), when I run my publish sub routine:

Private Sub publish()
    ThisDocument.save

    Call ExportVisualBasicCode
    ' Here I would like to automatically push the code to GIT
    Call CloseAll
End Sub

Then I manually go into git shell and type:

git config --global user.name "xxxxx"
git config --global user.email "xxxx@xxxx.com"

cd Z:/Dokumentstyring/GIT
git init
git remote add origin xxxxxx/xxx/Dokumentstyring.git
git add .
git commit -m "Version Number - Date and a short comment"
git push -u origin master

Is there a way that I can get my publish routine todo this manually work for me?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.326154 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO