https://github.com/shinjith-dev/git-sync
Bash script for syncing updates to GitHub.
https://github.com/shinjith-dev/git-sync
git github script sync
Last synced: 11 months ago
JSON representation
Bash script for syncing updates to GitHub.
- Host: GitHub
- URL: https://github.com/shinjith-dev/git-sync
- Owner: shinjith-dev
- Created: 2024-12-02T22:18:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-02T22:43:06.000Z (about 1 year ago)
- Last Synced: 2025-02-03T23:36:49.003Z (about 1 year ago)
- Topics: git, github, script, sync
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-sync
Shell script for syncing updates to GitHub. Mainly intended for usage in automated sync cases, such as a cronjob.
**!!WARNING!!**
------
This script is likely immature and requires proper revision; use at your own risk. In the worst-case situation, you may end up with a messy git folder or repository.
## Control Flow
1. Add changes (if exists)
2. Commit changes (if exists)
3. Pull from remote
- Merge preferred pull, if fails due to conflicts or other reasons
- Tries rebasing from remote, again if that fails
- Reset to remote repo, if somehow that doen't work
- Exit
4. Pushing to remote
- Tries to push, if by any reason such as conflict resolution mistake fails
- Resets to remote repo, and pushes
5. Finish