Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push code for Github #33

Open
miguelmartins17 opened this issue Mar 2, 2020 · 21 comments
Open

Push code for Github #33

miguelmartins17 opened this issue Mar 2, 2020 · 21 comments
Assignees

Comments

@miguelmartins17
Copy link
Collaborator

How can I push the code of an entire application?
Do I need to push file to file or folder to folder or can I do it all right?

@nelsonic
Copy link
Member

nelsonic commented Mar 2, 2020

@miguelmartins17 good question. if you are in the root of the project simply run git add . (the . means "add everything in this directory and all sub-directories). e.g:

cd learn-flutter
git add .
git commit -m 'add complete code for TDD & Architecture Video 9 for issue #15'

@miguelmartins17
Copy link
Collaborator Author

After executing these commands this was the result.

Screen Shot 2020-03-02 at 10 12 23

@nelsonic
Copy link
Member

nelsonic commented Mar 2, 2020

@miguelmartins17 that's strange. 😕
Did you add the project files to the learn-flutter/tdd-architecture-example directory? 💭
If you want to show us your desktop via Zoom call, just message in Signal/@dwyl 💻

@iteles
Copy link
Member

iteles commented Mar 2, 2020

It might also help to run the git status command and git log to get a fuller picture.

@miguelmartins17
Copy link
Collaborator Author

This is the result when I run the git log command.

Screen Shot 2020-03-02 at 16 51 48

@nelsonic
Copy link
Member

nelsonic commented Mar 2, 2020

@miguelmartins17 after our Zoom call do you feel more confident in your git skills?

@miguelmartins17
Copy link
Collaborator Author

@nelsonic I tried to push the code to the GitHub but when I run the git push command this shows up.

Screen Shot 2020-03-09 at 10 54 29

@nelsonic
Copy link
Member

nelsonic commented Mar 9, 2020

@miguelmartins17 what did Google say when you pasted the error message and searched? 💭

@nelsonic
Copy link
Member

nelsonic commented Mar 9, 2020

The solution is right there in the yellow text. You need to run git pull before git push because there are changes on GitHub that are not reflected on your localhost ...

@miguelmartins17
Copy link
Collaborator Author

@nelsonic I tried to look for answers like using git pull but this only comes to me when I run the command.

Screen Shot 2020-03-09 at 22 02 47

@nelsonic
Copy link
Member

nelsonic commented Mar 9, 2020

@miguelmartins17 which branch do you want to be working on?
(maybe it's time that you give your branches more descriptive names) 💭

@miguelmartins17
Copy link
Collaborator Author

The branch miguelmartins17-patch-4 didn't show up at the terminal so I created it. Of course I should give the branches a better name.

@miguelmartins17
Copy link
Collaborator Author

@nelsonic I think I'm forgetting some steps so I can put the project in the GitHub.

@nelsonic
Copy link
Member

@miguelmartins17 agreed. Please revisit the Git guide: https://git-scm.com/book/en/v2
The better you know Git the faster you can get your work done.
We all take Git skills for granted much like we do with arithmetic, but it's worth knowing well.

@miguelmartins17
Copy link
Collaborator Author

I ran the git push command and this appears.

Screen Shot 2020-03-12 at 13 09 46

So I tried to run the command using the way they describe it there:
git push --set-upstream origin miguelmartins17-patch-4.

Screen Shot 2020-03-12 at 13 09 57

After that I thought about using git pull, and I got this result.

Screen Shot 2020-03-09 at 22 02 47

@nelsonic
Copy link
Member

@miguelmartins17 did you run the suggested command?

git branch --set-upstream-to=miguelmartins17-patch4

Followed by:

git pull

@nelsonic
Copy link
Member

@miguelmartins17 any luck/update?

@nelsonic
Copy link
Member

@miguelmartins17 please run this commend in your terminal:

git remote set-url origin [email protected]:dwyl/flutter-counter-example.git
git push -u origin master

@miguelmartins17
Copy link
Collaborator Author

https://github.com/dwyl/flutter-counter-example

I finished on pushing the empty project to this repository.

@nelsonic
Copy link
Member

nelsonic commented Mar 12, 2020

@miguelmartins17 now that you have your SSH key setup for GitHub, 🔐
you should be able to push code to GitHub without any issues. 👍

@miguelmartins17
Copy link
Collaborator Author

@nelsonic Thanks!!! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants