Engineering Portfolio
remote-repo Remote Synchronization Exercise
A minimal exercise focused on connecting a local Git repository to GitHub and verifying push, pull and synchronization.
Project Overview
remote-repo is a minimal example for practicing Git remotes. Its content stays small so attention remains on the relationship between local commits and GitHub branches.
Project Goals
- Initialize a local repository and connect a GitHub remote.
- Practice
add,commit,pushandpull. - Confirm the same revision locally and on GitHub.
Technology and Environment
Git, GitHub, Markdown, text files, a terminal, editor and GitHub account.
System Architecture
The repository contains only README.md and hello.txt. The README records goals, the text file creates observable diffs, and the remote connects the local branch to GitHub.
Implementation
- Initialize the local repository and add files.
- Configure the GitHub remote.
- Stage and create a local commit.
- Push the current branch.
- Pull a remote update and inspect the change.
Key Commands
Confirm the target and current branch before pushing, then rebase onto remote updates when necessary:
git remote -v
git branch --show-current
git status --short --branch
git fetch origin
git pull --rebase origin main
git add .
git commit -m "Update hello file"
git push origin main
Debugging and Verification
git remote -v verifies the destination, git branch --show-current verifies the branch, and git status shows ahead/behind state. The final content is confirmed on GitHub.
Problems and Solutions
Common failures include a wrong remote, wrong branch, rejected pushes because the remote is ahead, and the assumption that saving locally updates GitHub. The workflow treats save, stage, commit and push as four separate operations and pulls before pushing when history has changed.
Current Result
The public repository records the complete learning path for connecting, committing, pushing and pulling a local repository.
Summary
The exercise establishes remote-synchronization habits for later branching, collaboration and conflict resolution; it is not presented as an application.