I'm trying to store my project on github using Force.com IDE Tool (ant). I have created a new command to store my project on github defining it in the build.xml
file:
<macrodef name = "git">
<attribute name = "command" />
<attribute name = "dir" default = "" />
<element name = "args" optional = "true" />
<sequential>
<echo message = "git @{command}" />
<exec executable = "git" dir = "@{dir}">
<arg value = "@{command}" />
<args/>
</exec>
</sequential>
</macrodef>
<target name="initGit">
<git command="config" dir="retrieveUnpackaged">
<args>
<arg value="--global"/>
<arg value="user.name"/>
<arg value="'Dark, Skull'"/>
</args>
</git>
<git command="config">
<args>
<arg value="--global"/>
<arg value="user.email"/>
<arg value="'myemail@email.com'"/>
</args>
</git>
</target>
<target name="retrieveDeployVersioning">
<mkdir dir="retrieveUnpackaged"/>
<sf:retrieve username="${sf.source.username}" password="${sf.source.password}" sessionId="${sf.sessionId}" serverurl="${sf.source.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="retrieveUnpackaged" unpackaged="unpackaged/package.xml"/>
<sf:deploy username="${sf.destination.username}" password="${sf.destination.password}" sessionId="${sf.sessionId}" serverurl="${sf.destination.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="retrieveUnpackaged" rollbackOnError="true"/>
<git command="init"></git>
<git command="add">
<args>
<arg value="--all"/>
</args>
</git>
<git command="commit">
<args>
<arg value ="-m 'Initial Commit'"/>
</args>
</git>
<git command="remote">
<args>
<arg value="add"/>
<arg value="origin"/>
<arg value="https://github.com/test-versioning.git"/>
</args>
</git>
<git command="push" dir="retrieveUnpackaged">
<args>
<arg value="-u"/>
<arg value="origin"/>
<arg value="master"/>
</args>
</git>
</target>
All works great, but I want to update my package.xml incrementally and I don't want to overwrite everytime I push it.
How can I maintain the package.xml
update with all the resource that I have uploaded?