[NFBCS] Remote Tracking with Git Upstreams

Nathaniel Schmidt schmidty2244 at gmail.com
Tue Aug 4 08:29:47 UTC 2020


Hi Tyler,

Yes, this is somewhat helpful. Thanks.

========================================
Nathaniel Schmidt
Undergraduate student
Bachelor of Computer Science (S306)
School of Information Technology
Faculty of Science, Engineering and Built Environment
Deakin University, Cloud campus
https://sync.deakin.edu.au/profiles/student/njschmidt/
 
Std. ID: 220493627
E: njschmidt at deakin.edu.au
M: 0439591709
GitHub: https://github.com/njsch/
Skype: nathaniel_schmidt1994

> On 3 Aug 2020, at 10:04 pm, Littlefield, Tyler <tyler at tysdomain.com> wrote:
> 
> 
> I'm not totally sure what all of your output is supposed to mean, so I'll try to explain.
> When you track an upstream branch, or any branch remotely (this also isn't github specific), you're pointing a branch at a remote repo.
> I use this to merge upstream changes in on forked projects, which you've already mentioned.
> So a couple of tips:
> 1) When you want to create a branch off of your upstream, if you plan to submit a pr for example, you can do so by using:
> git checkout -b <your branch name> upstream
> where upstream is the upstream branch you want to use.
> To make sure that you're pushing to the right place, use git branch -a, find the one with the asterisk (*) next to it, that is your current branch. it will show remote/origin/... or origin/...
> PS: you should not be pushing to upstream branches regardless. Submit a pull request: create a branch off of upstream as I showed earlier, add your changes, commit, push. When you push to Github you will get a link for creating a pull request.
> 
> HTH,
> 
> On 8/2/2020 9:49 PM, Nathaniel Schmidt via NFBCS wrote:
>> Hi,
>> 
>>  
>> 
>> I hope this question has not already been asked as I am aware that a thread
>> similar to this was initiated a few weeks ago on one or two of the
>> blindness-related tech lists.  But I've been pretty busy and haven't had
>> time to read through everything.  I have a question regarding forked repos
>> and remote tracking.  How do I ensure that I am actually pushing to
>> origin/branch and not upstream/branch? I would like commentary on some Git
>> output from the Windows Powershell:
>> 
>>  
>> 
>> ---Begin---
>> 
>> Windows PowerShell
>> 
>> PS C:\GitInit\njsch\splashkit-core> git remote add splashkitowner
>> https://github.com/splashkit/splashkit-core.git       
>> 
>> PS C:\GitInit\njsch\splashkit-core> git fetch splashkitowner/develop
>> graphic 73 fatal: 'splashkitowner/develop'
>> 
>> does not appear to be a git repository
>> 
>> 
>> fatal: Could not read from remote repository.
>> graphic 738                    
>> 
>>  
>> 
>> 
>> Please make sure you have the correct access rights
>> 
>> 
>> and the repository exists.
>> graphic 738 PS C:\GitInit\njsch\splashkit-core>
>> 
>> git fetch splashkitowner
>> 
>> 
>> From https://github.com/splashkit/splashkit-core
>> 
>> 
>>  * [new branch]      develop             -> splashkitowner/develop
>> 
>> 
>>  * [new branch]      master              -> splashkitowner/master
>> graphic 738  * [new branch]    
>> 
>>  new/add-serial      -> splashkitowner/new/add-serial
>> 
>> 
>>  * [new branch]      new/twitter-account ->
>> splashkitowner/new/twitter-account                                          
>> 
>> PS C:\GitInit\njsch\splashkit-core> git checkout develop
>> graphic 738 Already on 'develop'
>> 
>>  
>> 
>> 
>> Your branch is up to date with 'origin/develop'.
>> 
>> 
>> PS C:\GitInit\njsch\splashkit-core> git branch -u splashkitowner/develop
>> graphic 738 Branch 'develop' set
>> 
>> up to track remote branch 'develop' from 'splashkitowner'.
>> 
>> 
>> PS C:\GitInit\njsch\splashkit-core> git branch
>> 
>> 
>> * develop
>> graphic 738 PS C:\GitInit\njsch\splashkit-core>
>> 
>> git checkout develop
>> 
>> 
>> Already on 'develop'
>> 
>> 
>> Your branch is up to date with 'splashkitowner/develop'.
>> graphic 738 PS C:\GitInit\njsch\splashkit-core>
>> 
>>  
>> 
>> 
>> ---End---
>> 
>>  
>> 
>> My problem occurs when I call "git branch -u splashkitowner/develop".  My
>> experience from other repos is that if I commit from here onwards, my
>> changes will not be successfully pushed, as Git will assume that I want to
>> push to remote rather than origin.  What do I do from here on? I need to go
>> back to origin/develop, not splashkitowner/develop.
>> 
>>  
>> 
>> Thanks in advance,
>> 
>>  
>> 
>> Nathaniel
>> 
>>  
>> 
>>  
>> 
>> ========================================
>> 
>> Nathaniel Schmidt
>> 
>> Undergraduate student
>> 
>> Bachelor of Computer Science (S306)
>> 
>> School of Information Technology
>> 
>> Faculty of Science, Engineering and Built Environment
>> 
>> Deakin University, Cloud campus
>> 
>> https://sync.deakin.edu.au/profiles/student/njschmidt/
>> 
>>  
>> 
>> Std. ID: 220493627
>> 
>> E: njschmidt at deakin.edu.au <mailto:njschmidt at deakin.edu.au> 
>> 
>> M: 0439591709
>> 
>> GitHub: https://github.com/njsch/
>> 
>> Skype: nathaniel_schmidt1994
>> 
>>  
>> 
>> _______________________________________________
>> NFBCS mailing list
>> NFBCS at nfbnet.org
>> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
>> To unsubscribe, change your list options or get your account info for NFBCS:
>> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/tyler%40tysdomain.com
> 
> -- 
> Take Care,
> Tyler Littlefield (he/him/his)
> Tyler Littlefield Consulting: website development and business solutions. My personal site My Linkedin @Sorressean on Twitter
> 


More information about the NFBCS mailing list