Git push not appearing in Github - java

I recently just made a few changes to my repository and committed and pushed everything as usual with no warnings or errors.
However, Github doesn't reflect these recent changes. When I look through the source files through Github's file view, all the files that I had changed look the same as before.
However, when I make a new clone of my repository and look through those files instead, they are all the most recent version with my committed updates.
How do I resolve this issue with github?

I had the same problem with a branch that I could not see on github it is actually due to the fact that github currently meets some issues as you can see here https://status.github.com/

Related

How to update a Github project on IntellijIdea

Everyone
I don't know if the question has already been asked, but I'm looking everywhere but I can't find it.
I am working on a project on Intellij IDEA using GitHub.
I use my desktop computer at work to develop. After finishing I make a commit on Github and it is directly on my account.
But, sometimes I would like to continue at home on my laptop, using the same project as well as modifying and committing it.
Not knowing much about Github in integration with Intellij, I know that I can take an existing project and thus download it locally on my computer. But my question is, how can I update the changed files on each computer.
Example, I work at the office, I modified the A and B file, I commit it to Github, and at home on my computer, I update the Github project on Intellij and suddenly I have the new files modified.
If you have a solution, thank you!
I think you should need to take a "deeper" look into git fundamentals, here's a quick tutorial I think would do for your case:
Learn the Basics of Git in Under 10 Minutes
Also (if u can, and have the time) I would suggest you learn to use the git CLI before the IntelliJIDEA integrated plugin, so that, in case of problems, you know where to look under the hood.
To put it in easy words the most straight-forward thing you can do is (assuming you have already set-up a repo and a branch to work on):
(on the device you just worked on)
git commit -am "comment your wip here"
git push
(on the device where you want to get the work updated)
git pull

Can I overwrite a Git repo with a completely new project?

I got a new computer yesterday. I am coding in Android Studio for a course that I'm taking, and I figured it would be as easy as re-downloading Android Studio and cloning my repo onto the new computer. It isn't.
Something is messed up about my Gradle version, and I don't have the time to figure it out before the next due date.
The solution I've potentially come up with is, because my program is relatively small at the moment (only a couple files beyond the boiler-plate files that come with any Android activity), to just copy and paste the Java code from each of my files into a newly generated empty activity with all the right Gradle versions, and then just push that to the repository.
My question is: is that possible to do? If so, is it as easy as just pushing the new project (without having ever cloned the repository), or is it more complicated? If possible, elaboration on an answer would be greatly appreciated.
Thank you!
It's very straightforward to do it:
Clone the desired original project
Add your desired code on top of the clone
Add & commit your changed
Now you can push your changes in several ways:
You can have a new commit
git push origin <branch name>
You can overwrite the current commit on your remote
git push -f the -f will force to "overwrite" the existing code
Yes, you can.
You just have to link your new local project to the git repository,
once you push the new changes they will erase the old ones.

How to update the repository of the current project on github?

I have uploaded my project on github using intellij IDE but I need to know how to update the uploaded repository on github when I add new code ?
"Adding new code" into your Git repository (your local repository, at first) is made by "making a commit". Full details about this : https://git-scm.com/docs/git-commit
Then, after one or more commits, if you want to upload your changes to your remote repository (the one at GitHub), you'll have to "push" your changes : https://git-scm.com/docs/git-push
For details and examples on using Git (because this goes far beyond a Q&A site thread), please have a look at my Git beginner's guide
The question does not look IntelliJ-specific.
To update the code on GitHub you need to commit changes to your local git repository and push the changes to GitHub. See https://help.github.com/en/articles/pushing-to-a-remote
Check the docs to see how exactly one commits and pushes in IntelliJ.
https://www.jetbrains.com/help/idea/commit-and-push-changes.html

How to resolve conflict in GitLab using GitShell or GitHub Desktop

I am pretty new to GitLab because we just moved to it from ClearCase. I Cannot merge some changes into my remote then to my local repo because the GitHub Desktop says that there are some conflicts. I have been looking around to find a simple solution for this in order to view the conflicting file. I got quite a few changes in my local too so I don't want to play around too much with the unfamiliar Git commands because I don't want to loose any of my changes. Is there simple way to find out which file is causing the conflict. I used git status and it says that my local branch is up to date.
I am a little lost. Can someone give me some hints.
Thanks
If i understood correctly then
Is there simple way to find out which file is causing the conflict?
Then try this command git ls-files -u will give a list of conflicts from Git.
Also you want to save your local changes then use git stash if you don’t want to do a commit of half-done work and you can get back to this point later by using git stash apply

Reverting source code to Java after IntelliJ's Kotlin > Java conversion

So I wanted to try out converting our backend API source code which is written in Java and see how it looks (IIRC there is a preview before converting), but once I did it it automatically started converting all the files in the selected folders, and in the end it asked for code corrections, which I responded with no as I wanted to cancel it and now I am stuck with a broken code base with no other options than:
Reverting to the last git commit and reimplementing all the changes done from my side (I could have prevented it but committing before the conversion but oh well)
Continue using Kotlin to code in but I have code errors which I don't know how to fix
What I am asking instead is if there's anyway to convert Kotlin back to Java in IntelliJ IDEA? Thank you in advance
Intellij has a feature called Local History and it can be used to go back in time for things you did not commit to your source control system. This history is retained until you install a new version of IntelliJ IDEA or invalidate caches. Read more in the Intellij help for the feature.
Your source code constantly changes as you edit, test, or compile. Any version control system tracks the differences between the committed versions, but the local changes between commits pass unnoticed. Local History is your personal version control system that tracks changes to your source code on your computer and enables you to compare versions and roll changes back, if necessary. Local History is always at your disposal, no steps are required to enable it.
Local History is independent of external version control systems and works with the directories of your project even when they are not under any VCS control. It applies to any structural artifacts: a project, a directory or package, a file, a class, class members, tags, or selected fragment of text.

Categories