|
-
Jun 26th, 2024, 07:37 AM
#1
Thread Starter
Fanatic Member
[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.
-
Jun 26th, 2024, 08:31 AM
#2
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:
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:
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:
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):
-
Jun 26th, 2024, 09:41 AM
#3
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
-
Jun 26th, 2024, 09:41 AM
#4
Re: Git not working for me on push, nothing in online GIT repo changes
 Originally Posted by sdowney1
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...
-
Jun 26th, 2024, 10:42 AM
#5
Thread Starter
Fanatic Member
Re: Git not working for me on push, nothing in online GIT repo changes
 Originally Posted by PlausiblyDamp
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.
-
Jun 26th, 2024, 10:42 AM
#6
Thread Starter
Fanatic Member
Re: Git not working for me on push, nothing in online GIT repo changes
 Originally Posted by techgnome
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.
-
Jun 26th, 2024, 10:53 AM
#7
Thread Starter
Fanatic Member
Re: Git not working for me on push, nothing in online GIT repo changes
-
Jun 27th, 2024, 09:18 AM
#8
Thread Starter
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|