Question

I am trying to work with GIT, without creating private branches.

What that means is I directly work on my cloned repository (master)

Now, Is that the right way to use GIT? I run into many issues related to updating my repository (GIT PULL / GIT FETCH). And most of the time, I am not able to use GIT Merge.

Is there a particular way in which i can use GIT MERGE, GIT PULL, and GIT FETCH. That will help me?

Looks like the best way to work with GIT is have branches.

Branch 1 GIT Commit GIT PUSH GIT MERGE master ( to fetch the newer changes)

Branch 2 GIT Commit GIT PUSH

master GIT Merge branch1 GIT Merge branch2

I dont think there any other way. Please correct me if i am wrong?

Was it helpful?

Solution

Jan Krueger's extended cheat sheet will help you cover the basics, and will expose you some common commands for using git.

IMO, git is a brilliant DVCS. If you have time; take a look at the structure of git and try to catch the ideas behind its design. For example this Tech Talk by Linus Torvalds.

Note: It looks like you are missing some core ideas behind using git, so please try to learn general approach of git before tackling with commands.

Note 2: As being a stalker, you seem to have general problems with git. So I repeat my advice once more. Learn basics, complete a tutorial, read/listen/watch a few useful source from notable people about git.

OTHER TIPS

Also read about git stash. It saves your local uncommitted changes so you can pull cleanly. Then run git stash pop to replay those changes on top.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top