Why is git so complicated? I don't understand anything. What is commit? What is pull? I am lost.
Why is git so complicated? I don't understand anything. What is commit? What is pull? I am lost
`man git`
or
`git --help`
Who's the trouser arouser?
you have to be 18 or older to browse Sup Forums
It's phoebe, dumbass.
>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.
It's too complicated mr. triples
I want Sup Forums 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
That makes more sense than 10 tutorials I read off the web, thanks user
>you don't understand yourself
Thanks for reminding that your validation isn't required.
When you explain something to yourself, you solidify your own knowledge. It's a win-win so plz stop moaning and start explaining.
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
Here is a decent free course on git
udacity.com
It's actually pretty clever.
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
Explain to me how it works pls, it'll be a great exercise for who desperately needs to learn it
>there exists a remote
Wtf is a remote
Thanks, that looks cool
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 commit
git add filename.cs
git commit -m "message that shows up in the repo describing what the fuck you did"
pushing the changes to the repository
git push
the end, faggot
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"
What if you have like folders and subfolders
Can you do git add swag/* ?
Ah, so remote = remote server
Okm that makes sense
If you want to add the entire folder with all of its contents, what I would do is
git 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.
Thanks
I don't know how helpful this would be for a complete beginner, but this article really helped me "get" git: sbf5.com
It honestly took me a while to remember these so I would recommend putting it in a handy document to keep track of.
use TortoiseGit if on windows
one of the sisters from charmed. good times.
To add to :
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."
git-scm.com
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.
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: 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.
youtube.com
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?
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