How to interface github with atmel studio7

Go To Last Post
50 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to Integrate my GitHub account with Atmel studio.

I have downloaded  Git Source Control Provider   extension in my Atmel studio 7 and Git is also installed on my PC

But can't able to make out how to integrated these two, as i can't find any good documentation or reference for doing so

This topic has a solution.

Kunal Gupta

github.com/gkunalupta

Last Edited: Sun. Oct 11, 2020 - 12:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You probably want to use VScode which has been getting lots of Git and GitHub integration, they have some ways to go but it seems fairly usable to me. The easy way to use it is with a packaged toolchain like on Ubuntu, but it also works with side-loaded tool chain (like the ones from Microchip). Hear is a setup I am tinkering with if you want an example.

 

https://github.com/epccs/MacGyver/tree/master/.vscode

 

One thing I recently figured out was how the define __AVR_DEV_LIB_NAME__ is from the -mmcu= avr128da28 compile option, so now IntelliSense can index my tool-chain and project properly (I was doing forced includes that caused strange problems). One other note is that Code will not look cross-origin for the includes (like GCC), so the header must be within the same origin (e.g., io.h wants to include ioavr128da28.h, but Code will only find it within the expected file system, while the compiler -I option that I am using does magic that may eventually be recognized as dumb.)

 

I am a terrible programmer, but IntelliSense has truly helped me step up my game, so I recommend that as much as Git/GitHub.

Last Edited: Fri. Oct 9, 2020 - 12:35 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kunalgupta wrote:
I want to Integrate my GitHub account with Atmel studio.

What, exactly, do you mean by that?

 

I've always found it perfectly adequate to just manage the revision control (Git, SVN, whatever) at the file system level

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

Kunalgupta wrote:
I want to Integrate my GitHub account with Atmel studio.

What, exactly, do you mean by that?

 

I've always found it perfectly adequate to just manage the revision control (Git, SVN, whatever) at the file system level

 

I think what he means is that e.g. once he hits save the changes should be commited immediately to his repository...or this is what I understood.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moe123 wrote:

 

 

I think what he means is that e.g. once he hits save the changes should be committed immediately to his repository...or this is what I understood.

 

 

Yes, like that only.

when I open the solution explorer and right-click the mouse, then I see the Option of git, but not able to make out how to proceed further.

if anybody can send any video reference or by image reference how this has to done

Kunal Gupta

github.com/gkunalupta

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

I havent used the Git Source Control Provider extension, but all what I can I tell you is that you dont really need it. you can make a empty project in your git repository, pull it to the project location, and once you pull it..you take your files put them there and then just simply commit your changes..if you want a gui which can make this for you there is plenty on internet. for example TortoiseGit:

https://tortoisegit.org/

 

supposing you are using Windows, as u are using AS7!

 

Regards,

Moe

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moe123 wrote:
once he hits save the changes should be commited immediately to his repository...

That sounds like a really bad idea!

 

You shouldn't just be committing stuff willy-nilly the moment you save it in the editor.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

Moe123 wrote:

once he hits save the changes should be commited immediately to his repository...

 

That sounds like a really bad idea!

 

You shouldn't just be committing stuff willy-nilly the moment you save it in the editor.

 

awneil, we would appreciate it more if you come up with ideas, solutions...etc intstead of just what u are currently doing all over the board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Moe123 wrote:
if you want a gui which can make this for you there is plenty on internet. for example TortoiseGit

Yes, I uses that (also TortoiseSVN).

 

An advantage with that is that it works with any & every file on your hard drive - not just within one IDE.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

awneil wrote:

That sounds like a really bad idea!

 

You shouldn't just be committing stuff willy-nilly the moment you save it in the editor.

Totally agree. I will edit a set of files 100 times, maybe later change/undo/discard some of the work before I am ready to git add (maybe only some of the edited files in the end) and then git commit. Can you imagine how pointlessly noisy git log would be if it had an entry for every last file edit? Also what about the git commit comments? I would have said the comments in the git log - that are a documentary log of how the project developed would not wanted to be tainted with a lot of irrelevant nonsense.

 

Surely the only way "git integration" could work is that you make a bunch of edits across multiple files then when you are ready to commit you invoke some kind of "commit now" memory entry/button or whatever. It pops up a "enter your git commit comment" dialog, you do that and the commit is made.

 

But if you were going to do all that why not simply do the git add's and git commit elsewhere (being a luddite I still favour the command line for this!)?

 

(having said all that the one facility of "Team Explorer" git integration I do like in Visual Studio is the ability to git blame a file while editing - I want to know who applied the change that has completely screwed up what I've been working on for the last 6 months when I see it (and find the SHA so I can find the commit in Gerrit and JIRA)!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I did some googling on "when to commit" - a couple of examples:

 

https://jasonmccreary.me/articles/when-to-make-git-commit/

 

https://blog.scottlogic.com/2019/12/19/source-control-when.html

 

These would apply to any revision control system - not just Git

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

awneil wrote:

That sounds like a really bad idea!

 

You shouldn't just be committing stuff willy-nilly the moment you save it in the editor.

I Also agree. - I always review my changes before I commit them sometimes spending an hour or so isolating a particular "change set". I often commit just a few of the changed lines leaving other changes for future commits.

 

The Visual Studio "Team Explorer" & Revision Control system is a bit clunky but usable. IMO, the Java IDEs ,Eclipse, MPLAB etc do this better.

 

I presume the OP want to see these options on the right-click context menu.

 

 

<edit>: I believe the Github repository support versus a local git repository is handled via the Git Backend and Studio doesn't need to know about that.

 

Last Edited: Fri. Oct 9, 2020 - 09:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think this depends very much on whether you're collaborating with a group, or just using Github as a cloud backup and code distribution mechanism for an individual project.

For collaborative projects, I tend to push changes regularly so that they're visible to others. Otherwise I work in a local clone and only push changes when I'm ready to issue a release. Some of my libraries are registered with the Arduino project, so issuing a release will cause the IDE to prompt people to update their copy. I don't want this to happen until it's fully-tested and the metadata files have been updated.

 

The Arduino IDE has no git integration, so I use the Github desktop app and a couple of diff scripts.

 

My local drive is synced with iCloud, which captures every change (regretted or otherwise), so I also use Github as a point-in-time snapshot type backup.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

https://github.com/yysun/Git-Sou...

 

  • Right click within solution explorer and select "Git". If Git for Windows, Git Extensions or TortoiseGit are installed, their commands are listed in the menu.

 

 Read up on to work one of those three providers to see how to talk to github. It can't be too difficult - zillions of people have done it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The integration in Code is not complete and expects the user to know Git somewhat. I know Hg better than Git (or use to, that line is getting blurry.) If you know Git, these images will make sense; otherwise, they may not.

 

 

 

 

The green bar in the editor that indicates new lines may not have been there the last time I looked; there is a lot of Code that is a work in progress.

Last Edited: Fri. Oct 9, 2020 - 07:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ron_sutherland wrote:
expects the user to know Git somewhat.

I think that has to be the case - however you use it?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It sounds like the OP is really asking for an off-machine backup copy. I do that by having my project in a DropBox folder. That has the side benefit of providing access to the project by other computers (that use the same DropBox account). Do that all the time between my Mac and my Win laptop that hosts AS7.

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Aside: (utility of using Git)

ka7ehk wrote:
It sounds like the OP is really asking for an off-machine backup copy.
I'd suggest that Git is a little more sophisticated than this ;-)

 

Given that you can easily setup a github account I'd just use that and then either standalone, or AS7 integrated, use Git access to interact with it.

 

As an example here's something I've been toying with recently: https://github.com/wrightflyer/S... The git log shows that in the last 22 days I have committed 45 changes to that project. A typical change looks like:

 

https://github.com/wrightflyer/S...

 

At each iteration there's a commit comment where I describe what I have been doing. Then the "diff" display shows the lines that were removed/added to show exactly how things changed.

 

This is a project for one person but I still think the use of Git is justified. As you can see there's apparently two contributors ("Wrightflyer" and "Cliff Lawson"). That's just me working on it in two different locations. In fact this is one reason alone to use Git - it lets me work on it on one machine, push the changes then later, using the other one, pull the changes and add more to it and so on.

 

Oh and Github gives you things like a Wiki ( https://github.com/wrightflyer/S... ) so you can scribble some musings as you go along.

 

(and you can set things in Github "private" so that it's not exposed to the public (only Microsoft - who now own Github).)

Last Edited: Sat. Oct 10, 2020 - 08:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That was the reason for my suggestion. If I am right, Github is more than what the OP really needs. Instead,  GoogleDrive, DropBox, or one of the other such tools might be easier. You just run the whole project in the tool folder, and be done with it.

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
You just run the whole project in the tool folder, and be done with it.
But then you don't get things like change tracking? If you don't have this how do you know it was "changeset14" where you added the bit that frongles the wibgits ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Agree. I was just guessing at what the OP might "really" want.

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's considered 'cool' to have something up on github. As well, it can be handy for prospective employers to have a glimpse at what you have done.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
handy for prospective employers to have a glimpse

 

Clients also, but I do fear how the data could be used.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

https://github.com/yysun/Git-Sou...

 

  • Right click within solution explorer and select "Git". If Git for Windows, Git Extensions or TortoiseGit are installed, their commands are listed in the menu.

 

 Read up on to work one of those three providers to see how to talk to github. It can't be too difficult - zillions of people have done it.

 

 

when I do as you have told I get this screen.

P.S. I am new to this git and don't know much about its working flow and commands. So Should i have prior knowledge of git and version control system???

Kunal Gupta

github.com/gkunalupta

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Personally,   I just use the Windows "GitHub Desktop" application on the PC.

 

I edit, compile, test, ... on my local PC in the normal way.   e.g. Keil, Rowley, AS7.0, Notepad++, ...

 

GitHub Desktop tracks any changes.   When I want to commit to my local GitHub,   I do so.    When I want to update on the remote Repository,   I click on [Sync].

 

I can create test branches,  new repositories, ... on my (local) GitHub Desktop.

When I am ready,  I can [Publish] to the remote Repository.

 

I have an old Win7-32 Laptop and a Win10-64 Desktop PC.

I can work on any GitHub project on either PC.

 

I am horrified by the number of commits that I make and subsequently change.

But an automatic commit for each character that I type would drive me crazy.

 

Incidentally,  I use the "old GitHub Desktop" because the "new GitHub Desktop" will not run on a Win7-32 PC.

 

I believe the new app is more capable.

Note that some things can only be done on the main Repository.    (which I access via a Browser)

 

There are lots of powerful Git features via command line.    But most of the time you just use the simple ones via GUI e.g. Create, Branch, Publish, Commit, Sync, ...

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kunalgupta wrote:
. So Should i have prior knowledge of git and version control system???
Err yes.

 

I don't know how you could use any front end tool, however fancy, to interface with Git without first understanding the whole concept of revision control systems and Git in particular. I've been using Git for a decade (and another decade or more with SVN before that) and I think I still learn something new most days about git. 

 

The "Git book" is actually a very approachable explanation of what it does and how to use it: https://git-scm.com/book/en/v2

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also, yes, I started with CVS, then SVN and Hg and now Git. They helped me with test fixtures, test programs, and everything. Version control is critical.

Last Edited: Mon. Oct 12, 2020 - 05:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
Personally,   I just use the Windows "GitHub Desktop" application on the PC.

 

I edit, compile, test, ... on my local PC in the normal way.   e.g. Keil, Rowley, AS7.0, Notepad++, ...

Likewise - that's what I was saying in #4.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I am getting an error when I am using TurtoiseGit with AS7

I have installed Git extension in AS7 and when I commit the repo to my local PC it is done successfully 

but when I push my repo to remote, it is showing these two errors.

Can't make out why is this happening.

Hoping to get suggestions as soon as possible

 

 

 

 

 

 

 

 

 

 

remote repo URL and Name

Kunal Gupta

github.com/gkunalupta

Last Edited: Sat. Oct 17, 2020 - 05:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would just use the Github desktop

 

https://desktop.github.com/

 

it takes care of the keys for me, but still use TortoiseGit to look at Diffs and other local stuff. There is probably a way to tell TortoiseGit where to find those keys or how to set them up.

 

https://help.cloudforge.com/hc/en-us/articles/215243143-Configure-TortoiseGIT-client-to-work-with-SSH-keys-on-Windows

 

But it just works (no pain) with Github desktop (also with VSCode).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Kunalgupta wrote:
I am getting an error when I am using TurtoiseGit with AS7

Not sure what you mean by that?

 

Do you mean you're using Tortoise Git to do all the version control stuff from the Windows File Explorer ?

 

In that case, it now has nothing at all to do with AS7 - or any other IDE.

 

 

That is a Git error - you need to set up the authentication.

 

https://tortoisegit.org/docs/tortoisegit/tgit-dug.html#tgit-dug-general-auth

 

https://tortoisegit.org/docs/tortoisegit/

 

 

 

Does it work if you just do it straight from the Windows Explorer ?

 

EDIT

 

Or even from the command line?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Sat. Oct 17, 2020 - 09:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

 

Kunalgupta wrote:
I am getting an error when I am using TurtoiseGit with AS7

Not sure what you mean by that?

 

Do you mean you're using Tortoise Git to do all the version control stuff from the Windows File Explorer ?

 

In that case, it now has nothing at all to do with AS7 - or any other IDE.

 

 

That is a Git error - you need to set up the authentication.

 

https://tortoisegit.org/docs/tortoisegit/tgit-dug.html#tgit-dug-general-auth

 

https://tortoisegit.org/docs/tortoisegit/

 

 

 

Does it work if you just do it straight from the Windows Explorer ?

 

EDIT

 

Or even from the command line?

 

okay yeah i am using turtoise for all git operations

and thanks for these links.

 

I am not able to solve thing now why i am not able to pull my repo and this error is coming

Kunal Gupta

github.com/gkunalupta

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

You NEED to read up on how Git works. Until you do, you will keep going around in circles.

There's plenty written about it on the interwebs. 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You've got yourself in a bit of a mixed up state here:

Your git remote command shows two entirely separate repositories:

 

"gkunalupta/AVR-Embedded-c-programs"

and

"gkunalupta/Gettobyte_Youtube"

 

They cannot trivially co-exist in the same local repository.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This thing of having both local & remote repositories makes Git a whole load more complicated.

 

If it's just one individual working on personal projects, the extra complexity doesn't really gain you much - if anything.

 

So, if you're not already familiar with revision control systems in general, it might be easier to start of  with SVN ... ?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess it might just be familiarity but I'm fairly comfortable using Git for personal projects with github as my remote and one of my two active laptops as the working copy at any time.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mixing MINGW and AS7 (based on Visual Studio 15) is a flawed idea. Microsoft products do funny things to source files line ending ("\r\n"). MINGW will do funny UNIXish stuff to the line ending ("\n"). Mixing them is a path to madness.

 

https://en.wikipedia.org/wiki/Newline

 

This is where Visual Code Remote comes in; it can interface to a server on the remote machine. The server can also run on a local machine and in its WSL environment (e.g., UNIX).

 

https://docs.microsoft.com/en-us/windows/wsl/install-win10

 

https://code.visualstudio.com/docs/remote/remote-overview

 

When VSCode starts up, it looks at the environment it is running on and then does what that environment expects. Visual Studio 15 will do source the Windows way, but Git on MINGW will try to work with source the UNIX way; that is a sour mixture. The remote VSCode is like isolation between the environments, so their differences do not leak across.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

for removing a folder of repo from git 
command is 

git rm -r "folder name"

but on doing so i am getting this error cant find out why???
any suggestions please.
[git command for removing folder][1]

  [1]: https://i.stack.imgur.com/WMIpI.png

Kunal Gupta

github.com/gkunalupta

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

another query.

Do I have to pull my remote repo at the same path directory in my local PC 
in which my local repo is lying.

Say in my PC local repository's are at 

    C: users/Kunal/desktop/work/AVR_code

and now I want to push my some codes lying in this *AVR_Code* folder to my
GitHub account Repository ( A repo is already created in GitHub by name *gettobyte_youtube*)

so now for doing so I git bash at this folder *AVR_Code* and init git on this folder to keep track of my all codes.

Now for pushing codes from *AVR_Code* to my remote repo, *gettobyte_youtube*, I have to first pull the remote repo. So 
1) Do we have to pull the remote repo to the same location as that of the local repo.
Cant, we do like this: pull our remote repo to some other location and then push our local repository. As I don't want all of my codes of Local repo to be pushed to my remote server like Github. If not how should I do without mixing my *AVR_Code* whole folder with the remote repo folder 

2) How can I move files from one folder of the local repo to the other folder: Say I have three folders in  
   C: users/Kunal/desktop/work/AVR_code

    gettoyte/ youtube/ kunal/ .git / Readme.md

now I Want to move files from Youtube to gettobyte and vice versa.
How should I do that

Kunal Gupta

github.com/gkunalupta

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kunalgupta wrote:
As I don't want all of my codes of Local repo to be pushed to my remote server

 

I am going to reword this.

 

Quote:
I don't want all of my "sandbox" code to be checked into the "local" repo, since I do not want that pushed to my "remote" server (Github).

 

You have both a local and remote repo. If you look at the local repo you will see a hidden file named ".git", do not change anything in it (until you are an expert.) Inside the folder is a config file that will show some things.

 

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
[submodule]
	active = .
[remote "origin"]
	url = https://github.com/epccs/pyupdi.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
[remote "upstream"]
	url = https://github.com/mraardvark/pyupdi.git
	fetch = +refs/heads/*:refs/remotes/upstream/*
[branch "progress-bar"]
	remote = origin
	merge = refs/heads/progress-bar

 

In this case, I have two remotes; I can only pull to local with the "upstream," which is not my repo. However, I can both push from local and pull to local with the "origin" remote, which is my (forked) repo; Github desktop placed SSH keys in the proper location for the push (VSCode uses them also).

 

Now have a look at .gitignore

 

https://git-scm.com/docs/gitignore

 

and staging (a more advanced concept)

 

https://git-scm.com/about/staging-area

Last Edited: Sun. Oct 18, 2020 - 08:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Kunalgupta wrote:

for removing a folder of repo from git 

command is 

git rm -r "folder name"

Let's do a reset here:

Why-oh-why are you trying to learn GIT by using the command line interface ?

I do 95% of my git work using giu gui and gitk , (oh plus diffuse, a git aware difference viewer) these two utilities should pretty much suit you fine also.

 

I access it by right-click in explorer:

 

 

Here: I've done a change:

 

 

I think most, if not all the tasks you've asked about can be performed using this tool.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess "Git Bash" is shown in post #33; I have never used it. It seems to do the right thing in a Windows environment (diff post #38), but my past with MINGW was not favorable. The git-gui finds my SSH keys, and it did a pull from upstream and then push to origin. I like the icons with Tortoise, but they are not working very well (probably too many things trying to do icon overlay), so it's time to remove TortoiseGit.

 

https://git-scm.com/downloads/guis

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ron_sutherland wrote:
This is where Visual Code Remote comes in; it can interface to a server on the remote machine. The server can also run on a local machine and in its WSL environment (e.g., UNIX).

Microsoft's VS Code comes to Raspberry Pi and Chromebook – new v1.50 update is out | ZDNet

by October 9, 2020 -- 11:37 GMT (04:37 PDT) | Topic: Enterprise Software

Visual Studio Code is available for Linux Armv7 and Arm64 devices.

[third and fourth paragraphs]

While the Raspberry Pi and Chromebooks might not be powerful enough for all developer needs, Microsoft notes that VS Code's remote development extension pack can provide access to more powerful development environments when needed. 

The extensions allow developers to run commands inside a container, the Windows Subsystem for Linux or on a remote machine. 

[mid-page]

This month's notable extensions include the Microsoft C/C++ extension, which is out of preview and has reached version 1.0 with support for Linux on Arm and Arm 64 and featuring IntelliSense auto-complete, as well as remote build and debug support.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moe123 wrote:

I havent used the Git Source Control Provider extension, but all what I can I tell you is that you dont really need it. you can make a empty project in your git repository, pull it to the project location, and once you pull it..you take your files put them there and then just simply commit your changes..if you want a gui which can make this for you there is plenty on internet. for example TortoiseGit:

https://tortoisegit.org/

 

supposing you are using Windows, as u are using AS7!

 

Regards,

Moe

This really amazing GUI, I can literally run git on any folder without git commands running on CLI.

are their other GUI also present with such Interface like tortoisegit , as in here not much options are their when pushing and pulling the code

 

Kunal Gupta

github.com/gkunalupta

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kunalgupta wrote:
are their other GUI also present with such Interface like tortoisegit , as in here not much options are their when pushing and pulling the code
TortoiseSVN perhaps?

 

To be honest, for one man use the concepts in SVN may be a lot easier to understand than Git (which is really for distributed team work) so I'd maybe take a look at that as an alternative (but choose between TortoiseGit and TortoiseSVN as you would only want one installed or there'll be two confusingly different sets of options.

 

The difference between Git and SVN is that in the former you take a copy of the origin/master, work on it, then push changes back, Another worker (maybe even you on a different PC) works on other changes and pushes those and then there is a merging operation that tries to combine everything. With SVN it works more on the idea of only one person at a time working on any particular file - so you "checkout" that file so it becomes just yours to work on, So there can't really be two sets of edits on the same file at the same time.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


clawson wrote:
To be honest, for one man use the concepts in SVN may be a lot easier to understand than Git (which is really for distributed team work)

Indeed - that was my point in #36

 

choose between TortoiseGit and TortoiseSVN as you would only want one installed

It's certainly possible to have both installed:

 

But, unless you really need both, it is indeed just an unnecessary confusion and potential for mistakes ...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

This sums it up:

 

https://xkcd.com/1597/

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Exactly!!

 

laugh laugh laugh laugh laugh 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Prepare for the GH-100: GitHub Certified Practitioner Exam.

 

https://github.githubassets.com/images/modules/site/downloads/certifications/GitHub.Certified.Practitioner.Exam.study-guide.pdf

 

Woo, I got certified on some production equipment back when I was a youngster, but I can't even recall their names now.