Pushing a Local Ethereum Smart Home Project to GitHub: Problems Faced and How I Solved Them

While working on my Ethereum-based smart home authentication project, I encountered several unexpected issues when trying to push my local files from my PC to a GitHub repository. Although the task seemed simple, a combination of Git configuration issues, merge states, and editor problems made the process confusing.

📌 Project Context

The project is a blockchain-based smart home authentication system built using Ethereum and Truffle. The goal was simply to save and back up the complete local project structure to GitHub.

⚠️ Problems Encountered

  • Git entered a MERGING state unexpectedly
  • The default Git editor (Vim) opened and appeared “stuck”
  • Terminal kept flickering with no visible changes
  • git commit reported “nothing to commit”
  • Confusion about whether files were actually pushed or not

🔍 Investigation and Diagnosis

Running the following commands helped clarify the situation:

git status
git diff
git status --ignored

These showed that:

  • The working tree was clean
  • Ignored directories like node_modules and build were correctly excluded
  • The repository already had tracked files ready to push

🛠️ Key Fixes Applied

  • Exited Vim correctly using :wq or :q!
  • Configured Git to use Notepad instead of Vim:
git config --global core.editor notepad
  • Verified the remote repository:
git remote -v
  • Confirmed branch state and proceeded with push

🚀 Final Push Command

git push origin main

After executing this command, Git successfully compressed, wrote, and uploaded all project objects to the remote GitHub repository.


✅ Proof of Successful Git Push

The screenshot below confirms that the project was successfully pushed to the GitHub repository. The terminal output shows objects being written and the main branch updated without errors.

Figure: Terminal output confirming a successful git push origin main.

📂 GitHub Repository

https://github.com/idris0001/blockchain-smart-home-auth

📘 Lessons Learned

  • A clean working tree does not mean files are not already committed
  • Git editors can cause confusion if not configured properly
  • Always verify push results using terminal output and GitHub UI

This experience reinforced the importance of understanding Git states and configuration, especially when working on research or blockchain-based development projects.

Comments

Popular posts from this blog

From DSRC to 5G NR-V2X: The Road Ahead for Connected Vehicles

CTE 311: ENGINEER IN SOCIETY: CURRICULUM (20/21 SESSION)

🔹 Is Qualitative Data Always Primary Data?