Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411433 Posts in 69363 Topics- by 58417 Members - Latest Member: gigig987

April 20, 2024, 06:05:38 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Git
Pages: 1 [2] 3
Print
Author Topic: Git  (Read 3098 times)
Dacke
Level 10
*****



View Profile
« Reply #20 on: October 05, 2015, 01:02:49 PM »

Tutorials to advanced programs tend to assume you've first learned how to use a computer Wink

But. sure, it would probably be helpful for tutorials to command line programs to start by linking to command line tutorials.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
odrez
Level 0
**


Hey!


View Profile WWW
« Reply #21 on: October 05, 2015, 01:09:56 PM »

Yeah if you're unfamiliar with command lines it can be quite intimidating. I learned a lot just by entering stuff I found on the internet and then double checking if it did what I wanted. ^^

I recently did an onboarding for git for our graphic guys, who are very afraid of command lines. I got them on board with

, which has a pretty nasty installation process (because it's a nodeJs application), but(!) very easy to use.

The best part about it, is that it doesn't hide the functionality. I combines simplicity with visualizing what actually happens when you commit, branch, merge etc. - That's why I could get unexperienced users to understand what is happening.

My first git project was like:

* do stuff
* commit -m "0.1"
* do stuff
* commit -m "0.2"
* do stuff
* commit -m "0.3"
* etc.

it was basic but hey, it was a success in some way. ^^
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #22 on: October 05, 2015, 01:12:32 PM »

The last time I used Mercurial, I hadn't used Git yet, and my only SCM experience was with SVN, so take this with a grain of salt. But in my experience, I had a lot more trouble getting Mercurial to work with a team. With Git, if you're about to do something stupid like push before pulling, it refuses to do it unless you force it. With Mercurial, my team kept accidentally doing things like trampling each other's changes and leaving the upstream repo in a state that broke the SCM for everyone else.

Like I said though, we were all pretty new to SCM, so it was likely just user error and misunderstanding.

I've never seen that happen before and I'm pretty sure the default behavior makes that impossible. Are your sure you arent' pushing with the -f parameter?
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #23 on: October 05, 2015, 01:13:37 PM »

The git manual is actually pretty good for this stuff. You just have to read the entire thing at least twice.

http://git-scm.com/docs/user-manual.html
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #24 on: October 05, 2015, 01:28:30 PM »

You just have to read the entire thing at least twice.

No thank you?
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #25 on: October 05, 2015, 01:34:37 PM »

Also:


hahahaha. That's one of the reasons I sleep better at night when I have local changes on my machine via perforce. Even if the whole building goes down I don't lose any work because it replicates anything I do on my changelist serverside.

You just have to read the entire thing at least twice.

No thank you?

I feel your pain but git is one of those programs where you really benefit a lot more from it when you know everything little thing about it and how it works. For better or worse....
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #26 on: October 05, 2015, 02:58:18 PM »

If you want to understand how git -really- works, this is a lovely article that's a pretty light read:
http://tom.preston-werner.com/2009/05/19/the-git-parable.html

On a sidenote, I've had the unpleasant experience of being forced to use perforce today, the source control named after the only way developers use it.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #27 on: October 05, 2015, 03:09:06 PM »

If you want to understand how git -really- works, this is a lovely article that's a pretty light read:
http://tom.preston-werner.com/2009/05/19/the-git-parable.html

On a sidenote, I've had the unpleasant experience of being forced to use perforce today, the source control named after the only way developers use it.

lol that's not bad, I'm gonna steal that :p (if it ever comes up that is)

I guess you're in a situation where you have a bunch of people going over from git to perforce and are misusing it or something? How do you even force in perforce?

...then again even in git they shouldnt be using force very often
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #28 on: October 05, 2015, 03:34:13 PM »

lol that's not bad, I'm gonna steal that :p (if it ever comes up that is)

I guess you're in a situation where you have a bunch of people going over from git to perforce and are misusing it or something? How do you even force in perforce?

...then again even in git they shouldnt be using force very often

It's the school I'm studying game development at. They've decided to make perforce the required source control, despite having a perfectly fine working gitlab set up
Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #29 on: October 05, 2015, 03:42:18 PM »

My software engineering class actually wants us to eventually create a github account and start using git with our software, so I don't get why your school would even do that...
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #30 on: October 05, 2015, 03:43:52 PM »

lol that's not bad, I'm gonna steal that :p (if it ever comes up that is)

I guess you're in a situation where you have a bunch of people going over from git to perforce and are misusing it or something? How do you even force in perforce?

...then again even in git they shouldnt be using force very often

It's the school I'm studying game development at. They've decided to make perforce the required source control, despite having a perfectly fine working gitlab set up

Well if it's a content heavy game then I would be in agreement. My general rule to moving from git to perforce is if my content is over 100MB and I have a team. Especially if that team consists of dedicated artists and designers or if I have to write tooling for the pipeline (the perforce api is really good for writing custom tools). Its benefits become most apparent with large teams and large projects. Even moreso when the number of programmers on said project is not a majority.

If I'm on my own (or only with programmers) and am working on something pixelly and small I usually just go the lazy route and setup an hg/git repo locally.

If you REALLY miss a distributed workflow perforce actually has those features, you can branch offline and re-merge the same way you do with git. I never bother with it though. The common code problem can be handled differently than git via slicing. I figure if that need ever came up I would probably start looking more seriously at plastic. Then at the very least I have an excuse to try out their language aware semantic versioning and diffing.

Finally if you REALLY miss git. You can communicate with perforce via the git command api. http://www.perforce.com/git

My software engineering class actually wants us to eventually create a github account and start using git with our software, so I don't get why your school would even do that...

It's a game development school. If your plan is to go into large AAA projects with massive amounts of data that are inherently bound to a specific version of code then training people up in perforce is a good idea.

A software engineering class requiring you to setup git is also a good idea because if you are on a pure code project then not only is git a good choice, it's the standard choice.
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #31 on: October 05, 2015, 04:09:52 PM »

Oh ok I didn't know perforce was meant for handling resources as well, that explains it then. I guess I'll have to look into that as well eventually.
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #32 on: October 05, 2015, 04:21:58 PM »

The problem I have been having with perforce is that it seems to repetitively get in the way of my work. I understand the reasoning for things like art assets or big binaries, even with the new Git LFS extension, but so far it seems absolutely terrible for code. Of course a big reason to teach it is that it's industry standard, but that doesn't mean that schools should be teaching it as the defacto standard thing to use and entirely ignore and even prevent people from using alternatives.
Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #33 on: October 05, 2015, 04:33:12 PM »

Why not use both? create an src folder for code and make a git rep for that, and then make a resources folder and make that work with perforce. Why are we not using this hybrid method?

...

I found the answer after two seconds actually. The versions would need to be synced, which would be a massive pain in the arse to handle. Nevermind that.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #34 on: October 05, 2015, 04:39:24 PM »

The problem I have been having with perforce is that it seems to repetitively get in the way of my work. I understand the reasoning for things like art assets or big binaries, even with the new Git LFS extension, but so far it seems absolutely terrible for code. Of course a big reason to teach it is that it's industry standard, but that doesn't mean that schools should be teaching it as the defacto standard thing to use and entirely ignore and even prevent people from using alternatives.

That's pretty much my exact argument against git. No one SCM solution covers all bases right now. Not even remotely. We should be encouraged to not know and rely on one specific solution and in turn find ourselves steeped in dogma.

If you don't mind my asking, what is holding you back in the code realm? It might be the result of applying the git mental model to perforce. In git I live in the command line but in perforce they have such an amazing visual client I never use p4 from the command line unless I'm writing scripts or tooling.

The analogs aren't direct and trying to treat them as such can be detrimental but try to think of a CL as a local branch which can be overlayed (to achieve the same in git you would have 2 local branches which you then create a third new merged branch to achieve the overlay result).

Generally for a large game project devoid of constant branching I actually prefer perforce even for pure code concerns.
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #35 on: October 05, 2015, 04:42:42 PM »

That's pretty much my exact argument against git. No one SCM solution covers all bases right now. Not even remotely. We should be encouraged to not know and rely on one specific solution and in turn find ourselves steeped in dogma.

If you don't mind my asking, what is holding you back in the code realm? It might be the result of applying the git mental model to perforce. In git I live in the command line but in perforce they have such an amazing visual client I never use p4 from the command line unless I'm writing scripts or tooling.

The analogs aren't direct and trying to treat them as such can be detrimental but try to think of a CL as a local branch which can be overlayed (to achieve the same in git you would have 2 local branches which you then create a third new merged branch to achieve the overlay result).

Generally for a large game project devoid of constant branching I actually prefer perforce even for pure code concerns.

I've never really used git from command line, always used source tree and smartgit before that exists on windows. My biggest problem is that perforce locks all my files into readonly and requires me to individually check them out. This is absolutely useless when I want to do sweeping refactoring with tools, and as well I have to constantly break flow to move back to the client to check out a file while working on a feature or even just adding a bit of test code to scout out a bug.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #36 on: October 05, 2015, 04:43:07 PM »

Why not use both? create an src folder for code and make a git rep for that, and then make a resources folder and make that work with perforce. Why are we not using this hybrid method?

...

I found the answer after two seconds actually. The versions would need to be synced, which would be a massive pain in the arse to handle. Nevermind that.

Oh man you don't want to do that Smiley. Sync is just part of the problem. Start factoring in continuous integration, analysis and long running processes and your job becomes.... hell.

Incidentally this is what Plastic SCM tries to solve. Monolithic binary-friendly data storage mixed with distributed management for code.
« Last Edit: October 06, 2015, 06:43:21 AM by InfiniteStateMachine » Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #37 on: October 05, 2015, 04:44:35 PM »

That's pretty much my exact argument against git. No one SCM solution covers all bases right now. Not even remotely. We should be encouraged to not know and rely on one specific solution and in turn find ourselves steeped in dogma.

If you don't mind my asking, what is holding you back in the code realm? It might be the result of applying the git mental model to perforce. In git I live in the command line but in perforce they have such an amazing visual client I never use p4 from the command line unless I'm writing scripts or tooling.

The analogs aren't direct and trying to treat them as such can be detrimental but try to think of a CL as a local branch which can be overlayed (to achieve the same in git you would have 2 local branches which you then create a third new merged branch to achieve the overlay result).

Generally for a large game project devoid of constant branching I actually prefer perforce even for pure code concerns.

I've never really used git from command line, always used source tree and smartgit before that exists on windows. My biggest problem is that perforce locks all my files into readonly and requires me to individually check them out. This is absolutely useless when I want to do sweeping refactoring with tools, and as well I have to constantly break flow to move back to the client to check out a file while working on a feature or even just adding a bit of test code to scout out a bug.

Ah yes I totally forgot about that. I use tooling that avoids that so it hasn't been an issue for me for a long time. What is your main code editor of choice? I might be able to help you avoid those problems. Tools like sublime, notepad++ and visual studio have ways to do checkout-on-edit.
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #38 on: October 05, 2015, 04:46:45 PM »

Ah yes I forgot about that. I use tooling that avoids that so it hasn't been an issue for me for a long time. What is your main code editor of choice?

Visual Studio, not really of choice, more industry standard have to use it. I use atom for my personal projects and any auxiliary tools I can get away with writing in Rust instead of C++ (more industry standard).
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #39 on: October 05, 2015, 04:56:58 PM »

The quickest way without installing any software to do it is the following :

1) Go to Tools -> External Tools
2) Add a new command with "p4.exe" as the program and edit as the arguments with the file path aka "edit $(ItemPath)"

Then you can assign a command to the hotkey. Tools\Options\Environment\Keyboard. Assign to  Tools.ExternalCommand1 (the number is the index of the command, it's stupid I know :| )

There's also an official plugin but I've never tried it.

http://www.perforce.com/product/components/visual-studio-plug-in

EDIT : Talked to a buddy who said you can most likely also bind the command to an existing keystroke like ctrl-s to get near-exact behavior to git.

« Last Edit: October 05, 2015, 05:27:36 PM by InfiniteStateMachine » Logged

Pages: 1 [2] 3
Print
Jump to:  

Theme orange-lt created by panic