updating software using git

If your software is version controlled using git for example, you need to version control the software update as well. For file changes, there are 3 possibilities:

a) file modified
b) file deleted
c) new file added

to handle part a) and b), we can run this code in command line

git status | grep modified: | awk '{print $3}' | xargs git add
git status | grep deleted: | awk '{print $3}' | xargs git rm

by this time, “git status” show see only the “untracked files”. manually “git add” the new files.

Note that this is only for file updates. for db updates, things can become extra complicated depending on the infrastructure.

Like it.? Share it:

Comments are closed.