vamseeachanta / assetutilities

Utilities for performing day to day tasks. Helps in automation of day to day business tasks
MIT License
0 stars 1 forks source link

git | branch, computer and multiuser merge #19

Open vamseeachanta opened 4 months ago

vamseeachanta commented 4 months ago

Objective:

vamseeachanta commented 4 months ago

gitflow - most generic perform these actions on the most pressing repositories

As part of this, I prepare a powershell script to run git pull and push automatically. Works only if all git repostitories are in c:\github https://github.com/vamseeachanta/assetutilities/blob/9b8bb01eb340ce71c8017f526e1ea05bbfdb4ca2/dev_tools/git_all_repos.ps1

CC: @samdansk2 , @JayachandraJangiti , @saiachanta2728

vamseeachanta commented 4 months ago

Way Forward: Concepts to implement:

vamseeachanta commented 2 months ago

https://stackoverflow.com/questions/70884908/default-git-commit-behavior-to-allow-empty

Avoid unnecessary merge codes when no files are changed. via config or via git commit message etc.

samdansk2 commented 2 months ago

@vamseeachanta Hello sir , Try the below one for Git no changes issue ,

foreach ($d in $dir) { echo "Checking for changes in folder ... START" echo $d.FullName Set-Location -Path $d.FullName $changes = git status --porcelain # checks if there are changes in the working directory otherwise skips

if ($changes) { echo "Changes detected. Running git push pull in folder ... START " $daily_routine_batch = Join-Path $d.FullName -ChildPath ("dev_tools\daily_routine.bat") & $daily_routine_batch & echo "Running git push pull in folder ... DONE" } else { echo "No changes detected. Skipping git operations." }

vamseeachanta commented 2 months ago

@samdansk2, script is working great. Excellent work.

samdansk2 commented 2 months ago

@vamseeachanta Thankyou sir .