Github Desktop version is Chocolate-Covered Yaks (3.3.4.0) 50415df.
There are a lot of tutorials and responses on here, but all of them talk about things like sync buttons. There is no sync in this version.
The files have been committed. Clicking on 'open this repository in explorer' shows all the correct files on the local computer, but they do not show up on the website.
Does anyone know how to push in the new version?
Alright. I'm assuming you have cloned the repo you are working in. And you own the repo you are working in. Meaning you have full access to the repo and you can push and commit to the repo.
https://i.imgur.com/K8zwLem.png
You need to make changes to your local files, it would show up like so in the screenshot above.
Once you have changes you are satisfied with, write something in the summary box and "commit" to the branch you are working on.
After you commit, you should get a button on the top right saying "Push origin"
https://i.imgur.com/K8zwLem.png
If you don't see it, try pressing the pull button before you push.
Related
I see this message below my repo name. Is there any way to remove it? I used template for my app for a quick start, but in current form my app doesn't look like this template, because everything changed so much. I don't see any reason why it's still there.
I had the same problem and at the time for writing this answer, there is no option of removing this from Github. So removed this tag by deleting the repository from Github and recreating a new one with the same name.
⚠️ This operation will preserve only the information stored in git, not all other Github features, i.e. issues, PRs, ... If your repository has been used for a while, this might not be the right time to do this anymore.
Specific instructions:
Make sure you have cloned your repository and all your non-stale branches are saved locally.
git fetch
Delete the original repository in the Github web UI.
Create a new repository with the same name.
Push the branches you want back to the remote.
git push
Recently, we have started a group project and decided to use GitHub to share the code among ourselves.
For example, if I created a login page and my friend created a home page, how can I get it on my local machine.
I mean, whenever a change is made to the repo, do we need to download it all again?
The beauty of GitHub is that you can always go back whenever you feel like.
Whenever a changed is made by any of the teammate, it's a really good practice that you push that change. Even when it's a small one. After you've pushed your changes, your teammates would need to pull that change.
The best sequence for this is;
- git commit
- git pull
- git push
You'll have to pull the changes first as it would help you avoid getting merge conflicts. If you get any merge conflicts on any line, or any function, you'll resolve that conflict and follow the same sequence once again.
So, to conclude, GitHub is so easy to use and you won't have to necessary 'Download' all the changes once again. I would recommend you to setup via Visual Studio 2019 so that it becomes easier for you to just "pull" the changes whenever a new change has been made.
I'm fairly new to programming and thought I'd try out version control. I created a GitHub account to help me track my journey of creating my first webpage.
I want to upload updated versions of my code as I go along (e.g. Stage1, then perhaps when I progress a little further Stage2, then Stage 3 etc). This would essentially be the same file of code but each time it will be added to/ edited slightly.
Could someone advise me as to how to do this?
Thank you! :)
Every commit you push to your repository is stored and then you can access every version that you have committed afterward.
Just go into your repo, click at your commits tab:
Commits Tab
Then you can access the version by clicking the commit hash you desire to browse:
Commit hash abbreviated
After this, you just click in browse files.
If you want to use in your computer another version, you just have to git checkout 'commit hash' inside your folder at sync with your git repo.
I've been reading many tutorials, trying to figure out easy steps to the workflow for contributing to a GitHub repository using GitHub itself (I'm a Windows programmer, so I find the local git CLI extremely awkward, as well as much more complicated than working entirely remotely in GitHub).
I will post the steps as I discover and develop them in the answer below.
Please, I cannot do this on my own, as I barely know what I'm doing. Suggest edits to my answer, or post comments and I will edit.
Easy steps to contribute to an existing GitHub repository:
If there is not already an Issue posting describing the problem or code change, create one on the GitHub repository (repo) in the Issues section.
Create your own GitHub account, if you do not have one.
Go back to the GitHub repository (repo) and click the "Fork" button. This will create a copy of the entire repo in your account as your own repo with the same repo name.
In your new repo on GitHub, click on the button "Branch: master". Enter a name of your new branch (include the issue number) and press Enter to create a new branch for your changes.
In your new repo and your new branch, click on the file you wish to edit or click the "Create new file" button. Make your changes.
When you are happy with your changes, scroll down to the "Commit new file" section. The title can be something like "Created file FILENAME". Add a description of your changes, including the issue number. Click "Commit new file" button to commit your change before testing it. Repeat for any additional files.
At the repo (Code section), click the green "Clone or download" button. Download a zip file to use locally to build if needed and test your changes locally.
At the repo (Code section), you should now see a notice, "Your recently pushed branches:". This means that your edits in your own repo created a "recently pushed branch". Inside this notice is a green button "Compare & pull request". Take a deep breath and push it. You will now be at the "Open a pull request" page. This will automatically request that the owner of the repo accept your changes.
If you see a "checklist", edit it to reflect your work so far. Otherwise, describe your changes in detail, referencing the associated Issue posting.
Click the green "Submit pull request" button. This posts your entry in a conversation about this request. If there are no edit conflicts, you should also see a green checkmark icon and the words "This branch has no conflicts with the base branch".
Wait for a response from the repo owner.
This is as far as I've gotten.
I started using SourceTree few days ago and after I committed and pushed my changes to the remote GitHub repository, the numbers on the buttons remain the same, for example if the number on the push button becomes 3 when I committed a change, after I pushed it; it needs to be 0 or empty. But that's not the case here, it remains the same even though it has successfully been pushed. I also checked that my changes had been pushed using a web browser by going to the GitHub site. Is it because of the branch that I have pulled from and am pushing to are different or something else? Can any one please help cause I don't understand it... Thanks!
The numbers shown on the right hand side of the Branches panel reflect how many commits ahead or behind the Tracking Branch you currently are. If the numbers aren't what you expect, you should verify that the branch is tracking what you actually want.
You can verify the tracking branch by right clicking your local branch (as depicted below) and expanding the Track remote branch menu item. Finally, if you want to change the tracking branch simply click the new target from the list and Sourcetree will update accordingly. Hopefully that helps make sense of the disconnect that can happen when you rename branches and provides some details around why it happens and a simple way to resolve.
The same thing also happened to me too, I was working on branch I had push everting but was keeping appearing one unsend Push and miraculously also appear unsend Push on Master.
So what did was the same as Hristo Staykov and Sammie remove the Master branch from my local computer, since I had one miraculously unsend Push on Master did need to run this line terminal to remove the branch:
git branch -D master
And then Repository > Refresh Remote Status
I simply use the keyboard shortcut from the Repository menu:
CTRL+ALT+R (or control+option+R if you prefer)
My guess is that the shortcut would be the same or at least similar on Windows. Just look for the option called Refresh Remote Status under the Repository menu.