Why is git so complicated? I don't understand anything. What is commit? What is pull? I am lost.
`man git`
or
`git --help`
>>61525925
Who's the trouser arouser?
>>61525982
you have to be 18 or older to browse 4chan
>>61525982
It's phoebe, dumbass.
>>61525925
>What is commit? What is pull? I am lost.
God damn, OP. At least TRY googling before posting this shit here. git-scm.com/book read the first three chapters.
>>61526111
It's too complicated mr. triples
I want /g/ to explain to me the basics of git
If you can't explain it to someone like me you don't understand it yourself
its like game saves
add and commit = a save
checkout = load a save
a branch is a save you loaded and continued to make a different project state. you can then merge this with the rest of the project
pull and push to get the latest changes from the server and add your own.
git clone gives you a copy of all the saves and branches
>>61526181
That makes more sense than 10 tutorials I read off the web, thanks anon
>>61526138
>you don't understand yourself
Thanks for reminding that your validation isn't required.
>>61526198
When you explain something to yourself, you solidify your own knowledge. It's a win-win so plz stop moaning and start explaining.
>>61526138
git's pretty simple for an overview.
1. There exists a remote (such as "origin")
2. You clone that remote repo to your own computer
3. You commit your changes of that repo to your local copy
4. You can then "push" your changes
5. Others with the same repo checkout, can pull your changes into their local copy
git 101, by a retard
git clone github.com/repo/directory
That will copy the directory into your current working directory. You can also copy the whole repo.
git gud
>>61525925
Here is a decent free course on git
https://www.udacity.com/course/version-control-with-git--ud123
It's actually pretty clever.
>>61527230
The arrows are misleading for the pull and fetch, pull is supposed be fetch but also updates the working directory
because autistic nerds like to make things sound more interesting than they are
>>61526222
Explain to me how it works pls, it'll be a great exercise for who desperately needs to learn it
>>61527199
>there exists a remote
Wtf is a remote
>>61527272
Thanks, that looks cool
>>61525925
Let me tell you what you probably need to know
Go to the directory of the project you are trying to commit in. To commit is to basically save your changes. Pull is grabbing the latest version and updating your local repository. Push is sending your latest commits to the online repository.
This is how you add a fucking file to your commit. You can have many files in a commitgit add filename.csgit commit -m "message that shows up in the repo describing what the fuck you did"
pushing the changes to the repositorygit push
the end, faggot
>>61527345
Pretty sure I messed that bit up a bit.
Think of a directory on your computer.
A remote is a directory on a remote server. The remote server would commonly be github, the directory that you're cloning would be the repo. Git by default names the remote server "origin"
>>61527408
What if you have like folders and subfolders
Can you dogit add swag/*?
>>61527420
Ah, so remote = remote server
Okm that makes sense
>>61527425
If you want to add the entire folder with all of its contents, what I would do isgit add shitfuck/
You don't use the asterix.
How2git
>You have a document
>Instead of keeping different versions of your work in progress like it's 1979, you decide to store the changes as you go
>Example, instead of mydocumentV1 ... mydocumentVN you have "commits" where you store the changes to the document, these being in the form of additions and releases.
>You can create independant branches of the document and merge them later automagically because the software resolves conflicts
>This is useful
>You can store your document remotely if you'd like
>This is also useful
There is a GitHub desktop client with a limited feature set, that might be helpful for starting out and getting acquainted with the terminology.
>>61527457
Thanks
I don't know how helpful this would be for a complete beginner, but this article really helped me "get" git: https://www.sbf5.com/~cduan/technical/git/
>>61527528
It honestly took me a while to remember these so I would recommend putting it in a handy document to keep track of.
>>61525925
use TortoiseGit if on windows
>>61525982
one of the sisters from charmed. good times.
To add to >>61526181:
Git is more oriented around "here are the changes that led to this save", rather than just focusing on the saves themselves.
This is useful because it helps you understand shit like rebasing: you're not actually shifting "saves" around or anything like that. Rather, when you have an offshoot branch and a main branch (like master), you can say, "Since we have the changes that led to the head of the offshoot branch, I'm just going to apply them to the main branch in the same way."
https://git-scm.com/book/en/v2/Git-Branching-Rebasing
Even though it might seem unnecessary (particularly if Git is your version control system), understanding exactly how git tracks version changes makes it much easier to wrap your head around things work.
>>61527371
git is not very difficult, but it's made for developers so they wanted to make it feature rich and useful and so it's not designed with regular people in mind.
Idiot proof interactive git tutorial: http://learngitbranching.js.org
everything is going to be fine
I forget the content of this video but I remember it helping me out when I started using it, maybe it will help you understand a bit better.
https://www.youtube.com/watch?v=ZDR433b0HJY
>>61526181
what about master, branch, fork
even looking at the 4chanx git page i got confused as fuck and sometime they dont put any documentation on how to use their code, how do i use their code?
>>61531326
The Master branch can be thought of the copy you pulled from the remote repository. You create your own branches off of the master branch and make changes, commit them, etc. Then you merge your branches you made changes on into your master branch. When you're done with all the changes you want to do, you create a pull request to the remote repository using the master branch on your machine as the branch to pull from. Forking is basically you taking someone's project and using yours as an alternative main repository