Search code examples
gitgithubgit-push

how to push specific changes from local repo to remote repo [GITHUB]?


I need some help in how i can made modifications to my github remote repo when adding changes in my local repo like here i added a simple hyper link to an element in my local git repo now how can i add this specific change to my remote github repo ?? I tried to push and it says everything up to date but when i check my remote github repo. No chnages have been made. Why ? please do help. newbie here.

Here you can see the change has been made in my local repo, now i need to push it to my remote repo :

enter image description here


Solution

  • You haven't committed changes here. git diff --cached won't show differences, if you had committed changes. git diff --cached is used to see difference between committed changes and ones in staging area(when do git add changed files moves to staging area). After committing the changes, you can do( assuming you want to push to origin's master branch)

    git push origin master