Results 1 to 8 of 8

Thread: [RESOLVED] Git not working for me on push, nothing in online GIT repo changes

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2024
    Posts
    874

    Resolved [RESOLVED] Git not working for me on push, nothing in online GIT repo changes

    I have had no changes to my online GIT since last week, even though I do a lot of pushes.

    https://stackoverflow.com/questions/...ing-up-to-date

    It looks a lot more complex than I thought or even like, with a lot more commands needed than just commit or push to make it work.
    I really don't wish it was so difficult, Goggle drive is easy and mostly friendly.

    How can I make GIT function for me?
    What is broken?

    pics showing things, like a commit push, non matching git vs local vs2022 code, notice the green comments in vs2022 are not in git repo.

    Git repo shows last week update only.
    Attached Images Attached Images     

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,380

    Re: Git not working for me on push, nothing in online GIT repo changes

    I cannot use any GUI for git commands, I don't know why, so I'm not sure how you'd do this from Visual Studio.

    However, if you open git bash and run:
    Code:
    $ git status
    This will show you what changes you have made that are not committed. If there are any changes, commit them by running:
    Code:
    $ git add .
    $ git commit -m "A meaningful message."
    The first line adds every change to the staging area and the second line commits the changes with the message.

    Next, you can pull down the histories from your remote repository by running:
    Code:
    $ git fetch
    Finally, you check if there are any changes between your branch and what is in the remote repository. Assuming your branch name is "master" then it'd be:
    Code:
    $ git diff origin/master --name-only
    This will tell you which files are different than what is up in the remote repo. My guess is that there are changes in your repo that your local branch doesn't have. If that's the case and you want to bring them into your local branch then run:
    Code:
    $ git pull
    Otherwise, if you want to overwrite your remote repo with what is in your local branch, then you'll need to do a force push assuming you have permission to (this is repo level permission):
    Code:
    $ git push --force
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Git not working for me on push, nothing in online GIT repo changes

    Based on the images, I think the issue was the OP missing the first step of doing an add to stage the changes... I noted this in the other thread... hopefully that solves the issue.


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,958

    Re: Git not working for me on push, nothing in online GIT repo changes

    Quote Originally Posted by sdowney1 View Post
    I have had no changes to my online GIT since last week, even though I do a lot of pushes.

    https://stackoverflow.com/questions/...ing-up-to-date

    It looks a lot more complex than I thought or even like, with a lot more commands needed than just commit or push to make it work.
    I really don't wish it was so difficult, Goggle drive is easy and mostly friendly.

    How can I make GIT function for me?
    What is broken?

    pics showing things, like a commit push, non matching git vs local vs2022 code, notice the green comments in vs2022 are not in git repo.

    Git repo shows last week update only.
    At the most basic gust committing and pushing is all you need, not sure how that is considered difficult. The only thing that might make it a bit more complex is if you are using multiple branches - you need to push each branch (or git push --all from a command line) to send all the changes.

    If you are pushing changes on a branch, then make sure you are looking at that branch on github.

    Google drive is not the same, it will not give you multiple branches or the ability go back to any previous commit though.

    The picture shows 11 uncommitted changes, and it shows you being on the 'master' branch. None of the other images show which branch you are looking at...

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2024
    Posts
    874

    Re: Git not working for me on push, nothing in online GIT repo changes

    Quote Originally Posted by PlausiblyDamp View Post
    At the most basic gust committing and pushing is all you need, not sure how that is considered difficult. The only thing that might make it a bit more complex is if you are using multiple branches - you need to push each branch (or git push --all from a command line) to send all the changes.

    If you are pushing changes on a branch, then make sure you are looking at that branch on github.

    Google drive is not the same, it will not give you multiple branches or the ability go back to any previous commit though.

    The picture shows 11 uncommitted changes, and it shows you being on the 'master' branch. None of the other images show which branch you are looking at...
    What's difficult is it's not been working for me for a week now. I agree GD wont be doing any of what you said, the only good thing is it did work to back up my code while git was not, cause I don't know how to use GIT properly yet.

    Will try and figure git out over next few days.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2024
    Posts
    874

    Re: Git not working for me on push, nothing in online GIT repo changes

    Quote Originally Posted by techgnome View Post
    Based on the images, I think the issue was the OP missing the first step of doing an add to stage the changes... I noted this in the other thread... hopefully that solves the issue.


    -tg
    I think your right about it. I can't test till this evening.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2024
    Posts
    874

    Re: Git not working for me on push, nothing in online GIT repo changes

    watching a how to use git in vs vid

    https://www.youtube.com/watch?v=BWqpTpo1kfw&t=841s

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2024
    Posts
    874

    Re: Git not working for me on push, nothing in online GIT repo changes

    This am, I was able to push properly the changes to my git repo online. The video made it very clear how to use Git with vs2022.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width